Results tested at 6 nodes (significantly affected genes)ΒΆ

6_nodes_significant_gene_APaxis_vae

CNS AP-axis VAE model

This notebook runs through the CNS analysis used in the VAE paper (ref: ).

We use genes that were found to be differentially expressed and aim to understand how different groups of genes responded to PRC2 knockout.

We do this by using a variational autoencoder (VAE).

Our VAE model uses a three layer network, and as input data, takes in the normalised expression matrix including the wild type and response to Eed-cKO.

Sections:

Part 1: VAE setup

1) Function setup
2) Read in processed dataframe and organise this
3) Build VAE model

Part 2: VAE as a ranking method

4) Setup data for visualisations
5) Quantify separability of latent space
6) Save VAE ranks to csv to run GSEA in R

Part 3: VAE to identify coordinating groups of genes

6) Build gene groups using VAE latent space
7) Save gene groups for ORA in R
8) Run motif anlaysis using FIMO on gene groups
9) Inspecting the groups in context of chromHMM annotations 
10) Inspect groups in terms of annotations for Epi paper
In [1]:
"""
--------------------------------------------------------
                     Imports
--------------------------------------------------------
"""

import os, sys
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
from sklearn.preprocessing import MinMaxScaler
import venn
from matplotlib_venn import venn3
from sklearn.decomposition import PCA
from scipy import stats
from sciviso import *
from sciutil import SciUtil
from scivae import Vis as VVis
import string
u = SciUtil()

module_path = os.path.abspath(os.path.join(''))
sys.path.append(module_path)


"""
--------------------------------------------------------
                     Global variables
--------------------------------------------------------
"""
date = '20210217'

gene_id = 'entrezgene_id'
gene_name = 'external_gene_name'

sci_colour = ['#483873', '#1BD8A6', '#B117B7', '#AAC7E2', '#FFC107', '#016957', '#9785C0', 
             '#D09139', '#338A03', '#FF69A1', '#5930B1', '#FFE884', '#35B567', '#1E88E5', 
             '#ACAD60', '#A2FFB4', '#B618F5', '#854A9C']

hist_colour = '#483873'

e11_colour = '#BEC0C2'
e13_colour = '#A7A9AC'
e15_colour = '#7D7E81'
e18_colour = '#58595B'

fb_colour = '#ffbf80'
mb_colour = '#ff8c1a'
hb_colour = '#b35900'
sc_colour = '#663300'
fb_color = '#ffbf80'
mb_color = '#ff8c1a'
hb_color = '#b35900'
sc_color = '#663300'

h3k36me3_colour = '#CEF471'
h3k27me3_colour = '#9F71F4'
h3k4me3_colour = '#9F00FA'
h3k4me2_colour = '#5930B1'
h3k4me1_colour = '#FFE884'
h3k27ac_colour = '#35B567'
h3k9me3_colour = '#1E88E5'
h3k9ac_colour = '#A2FFB4'
           
wt_colour = '#AADFF1'
ko_colour = '#A53736'

sns.palplot(sci_colour)
sns.color_palette(sci_colour)

project_name = '6_node_significant_genes'

data_dir = '../../data/'
r_dir = f'{data_dir}results/deseq2/'
fig_dir = f'../../figures/{project_name}/vae/'
output_dir = f'{data_dir}results/{project_name}/vae/'
input_dir = f'{data_dir}results/prelim/'
rna_dir = f'{input_dir}feature-counts_04052020/'
supp_dir = f'{data_dir}input/supps/'
logging_dir = 'logging/'
ora_dir = '../../data/results/6_node_significant_genes/functional/'

grey = '#bdbdbd'
hist_cmap = 'Greens'
rna_cmap = 'Purples'
div_cmap = 'seismic'

experiment_name = project_name
from_saved = True  # Load from a saved VAE
In [2]:
df_all = pd.read_csv(f'{input_dir}df-all_epi-2500_20210124.csv')
df_training = pd.read_csv(f'{input_dir}df-significant_epi-2500_20210124.csv')
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/IPython/core/interactiveshell.py:3062: DtypeWarning: Columns (4) have mixed types.Specify dtype option on import or set low_memory=False.
  has_raised = await self.run_ast_nodes(code_ast.body, cell_name,

1) Function setup

Here we just initialise the functions that will be used in the notebook.

In [3]:
"""
--------------------------------------------------------
                     Colour/style getters
--------------------------------------------------------
"""
def get_time_colour(c):
    if '11' in c or '10' in c:
        return e11_colour
    elif '13' in c or '12' in c:
        return e13_colour
    elif '15' in c or '14' in c:
        return e15_colour
    elif '18' in c or '16' in c:
        return e18_colour
    return '#FFFFFF'

def get_tissue_colour(c):
    if 'sc' in c or 'spinal' in c:
        return sc_colour
    elif 'hb' in c or 'hindbrain' in c:
        return hb_colour
    elif 'fb' in c or 'forebrain' in c:
        return fb_colour
    elif 'mb' in c or 'midbrain' in c:
        return mb_colour
    return '#FFFFFF'

def get_cond_colour(c):
    if 'ko' in c:
        return ko_colour
    elif 'wt' in c:
        return wt_colour
    return '#FFFFFF'

def get_mark_colour(c):
    if '36me3' in c:
        return h3k36me3_colour
    elif '27me3' in c:
        return h3k27me3_colour
    elif 'K4me3' in c:
        return h3k4me3_colour
    elif 'K4me2' in c:
        return h3k4me2_colour
    elif 'K4me1' in c:
        return h3k4me1_colour
    elif '27ac' in c:
        return h3k27ac_colour
    elif 'K9me3' in c:
        return h3k9me3_colour
    elif 'K9ac' in c:
        return h3k9ac_colour
    return '#FFFFFF'

"""
--------------------------------------------------------
                     Plotting
--------------------------------------------------------
"""
def pplot():
    return
        
def cplot():
    return
    
def save_fig(title):
    plt.savefig(f'{fig_dir}{title.replace(" ", "-")}_{experiment_name}_{date}.svg')
    
"""
--------------------------------------------------------
                     Heatmap and vis function
--------------------------------------------------------
"""

def plot_gene_heatmap(df, fb_genes, mb_genes, hb_genes, sc_genes, 
                      input_cols, vae_data, vae, gene_name, mark, method='input', 
                      title="", merge_reps=False, input_col_ids=None, cmap='', genes=None, 
                      values=None):
    brain_genes = []
    colours = []
    gene_idxs = []
    genes = genes if genes is not None else df[gene_name].values
    i = 0
    for g in genes:
        if g in fb_genes:
            brain_genes.append(g)
            colours.append(fb_colour)
            gene_idxs.append(i)
        i += 1
    i = 0
    for g in genes:    
        if g in mb_genes:
            brain_genes.append(g)
            colours.append(mb_colour)
            gene_idxs.append(i)
        i += 1
    i = 0
    for g in genes:    
        if g in hb_genes:
            brain_genes.append(g)
            colours.append(hb_colour)
            gene_idxs.append(i)
        i += 1
    i = 0
    for g in genes:    
        if g in sc_genes:
            brain_genes.append(g)
            colours.append(sc_colour)
            gene_idxs.append(i)
        i += 1
    heatmap_df = pd.DataFrame()
    heatmap_df[gene_name] = brain_genes

    if method == 'decoding':
        deocded = vae.decoder.predict(vae_data)
        deocded = scaler.fit_transform(deocded)
        vals = deocded[gene_idxs]
    elif method == 'input':
        vals = df[input_cols].values[gene_idxs]
    else:
        vals = vae_data[gene_idxs]
    vals = values[gene_idxs] if values is not None else vals
    
    vals = np.nan_to_num(vals)
    min_r = np.min(vals, axis = 1)
    max_r = np.max(vals, axis = 1)
    ov_c = max_r - min_r
    if not merge_reps:
        cols = []
        for i, c in enumerate(input_cols):
            if input_col_ids is not None:
                if i in input_col_ids:
                    heatmap_df[c] = np.nan_to_num(vals[:,i])
                    cols.append(c)
            else:
                heatmap_df[c] = np.nan_to_num(vals[:,i])
                cols.append(c)
        heatmap_cols = cols
    else:
        i = 0
        offset = 0
        max_c = len(input_cols)
        if input_col_ids is not None:
            offset = input_col_ids[0]
            max_c = len(input_col_ids)
        heatmap_cols = []
        
        while(i < max_c):
            if input_col_ids is not None:
                heatmap_df[input_cols[input_col_ids[i]]] = (vals[:, input_col_ids[i]] - min_r)/(max_r - min_r)
                heatmap_cols.append(input_cols[input_col_ids[i]])
            else:
                heatmap_df[input_cols[i]] = (vals[:, i + offset] - min_r)/(max_r - min_r)
                heatmap_cols.append(input_cols[i])
            i += 1
            
    print(heatmap_df.head())
    cols = []
    col_colours = []
    cond_colours = []
    tissue_colours = []
    time_colours = []
    for c in heatmap_df.columns:
        if 'wt' in c or 'ko' in c:
            cols.append(c)
            time_colours.append(get_time_colour(c))
            tissue_colours.append(get_tissue_colour(c))
            cond_colours.append(get_cond_colour(c))
        if mark in c and hist_metric in c:
            time_colours.append(get_time_colour(c))
            tissue_colours.append(get_tissue_colour(c))
            cond_colours.append('white')
            cols.append(c)
        elif 'log2' in c:
            time_colours.append(get_time_colour(c))
            tissue_colours.append(get_tissue_colour(c))
            cond_colours.append(get_mark_colour(c))
            cols.append(c)
    col_colours = [cond_colours, tissue_colours, time_colours]

    # Now plot the rnaseq response as a heatmap
    vmin = None
    vmax = None
    if cmap == hist_cmap or cmap == rna_cmap:
        vmin = 0
        vmax = 10
    elif cmap == div_cmap:
        vmin = -3
        vmax = 3
    heatmap = Heatmap(heatmap_df, heatmap_cols, gene_name,
                      title=title, cluster_cols=False, cluster_rows=False, vmin=vmin, vmax=vmax,
                      figsize=(5, 5),
                      cmap=cmap)
    heatmap.cmap = cmap
    heatmap.plot()
    pplot()
    save_fig(title)
    plt.show()

2) Read in processed dataframe

Here we import the results from running the AP-axis dataset generation script.

This used the output from differential analysis and also annotated histone marks to genes.

In [4]:
# Remove genes that weren't able to map to a gene name
gene_mask = []
for g in df_training[gene_name].values:
    if g == None:
        gene_mask.append(0)
    else:
        try:
            e = float(g)
            gene_mask.append(1)
        except ValueError:
            gene_mask.append(0)

df_training['gene_mask'] = gene_mask
print(len(df_training))
print(len(df_training[df_training['gene_mask'] == 0]))
df_training = df_training[df_training['gene_mask'] == 0]

# Smooth out the columns in the data frame i.e. for the clones we only put in the mean of the two replicates

cols_to_merge = [c for c in df_training.columns if 'wt' in c or 'ko' in c]
col_names = []
col_values = []
values = df_training[cols_to_merge].values
i = 0
while(i < len(cols_to_merge)):
    df_training[f'{cols_to_merge[i][:-1]}_merged-rep'] = 0.5 * (df_training[cols_to_merge[i]].values +
                                                                df_training[cols_to_merge[i + 1]].values)
    print("merged", cols_to_merge[i], cols_to_merge[i + 1])
    i += 2
12797
12797
merged wt11fb1 wt11fb2
merged wt13fb1 wt13fb2
merged wt15fb1 wt15fb2
merged wt18fb1 wt18fb2
merged wt11mb1 wt11mb2
merged wt13mb1 wt13mb2
merged wt15mb1 wt15mb2
merged wt18mb1 wt18mb2
merged wt11hb1 wt11hb2
merged wt13hb1 wt13hb2
merged wt15hb1 wt15hb2
merged wt18hb1 wt18hb2
merged wt11sc1 wt11sc2
merged wt13sc1 wt13sc2
merged wt15sc1 wt15sc2
merged wt18sc1 wt18sc2
merged ko11fb1 ko11fb2
merged ko13fb1 ko13fb2
merged ko15fb1 ko15fb2
merged ko18fb1 ko18fb2
merged ko11mb1 ko11mb2
merged ko13mb1 ko13mb2
merged ko15mb1 ko15mb2
merged ko18mb1 ko18mb2
merged ko11hb1 ko11hb2
merged ko13hb1 ko13hb2
merged ko15hb1 ko15hb2
merged ko18hb1 ko18hb2
merged ko11sc1 ko11sc2
merged ko13sc1 ko13sc2
merged ko15sc1 ko15sc2
merged ko18sc1 ko18sc2
In [5]:
cols_to_merge = [c for c in df_all.columns if 'wt' in c or 'ko' in c]
col_names = []
col_values = []
values = df_all[cols_to_merge].values
i = 0
while(i < len(cols_to_merge)):
    df_all[f'{cols_to_merge[i][:-1]}_merged-rep'] = 0.5 * (df_all[cols_to_merge[i]].values +
                                                                df_all[cols_to_merge[i + 1]].values)
    print("merged", cols_to_merge[i], cols_to_merge[i + 1])
    i += 2
merged wt11fb1 wt11fb2
merged wt13fb1 wt13fb2
merged wt15fb1 wt15fb2
merged wt18fb1 wt18fb2
merged wt11mb1 wt11mb2
merged wt13mb1 wt13mb2
merged wt15mb1 wt15mb2
merged wt18mb1 wt18mb2
merged wt11hb1 wt11hb2
merged wt13hb1 wt13hb2
merged wt15hb1 wt15hb2
merged wt18hb1 wt18hb2
merged wt11sc1 wt11sc2
merged wt13sc1 wt13sc2
merged wt15sc1 wt15sc2
merged wt18sc1 wt18sc2
merged ko11fb1 ko11fb2
merged ko13fb1 ko13fb2
merged ko15fb1 ko15fb2
merged ko18fb1 ko18fb2
merged ko11mb1 ko11mb2
merged ko13mb1 ko13mb2
merged ko15mb1 ko15mb2
merged ko18mb1 ko18mb2
merged ko11hb1 ko11hb2
merged ko13hb1 ko13hb2
merged ko15hb1 ko15hb2
merged ko18hb1 ko18hb2
merged ko11sc1 ko11sc2
merged ko13sc1 ko13sc2
merged ko15sc1 ko15sc2
merged ko18sc1 ko18sc2

3) Build VAE model

Since the VAEs are stochastic rather than deterministic we want to create our clusters based on a number of iterations. We also are interested in how much the genes differ in various latent spaces.

In [6]:
from scivae import VAE

hist_metric = 'signal'
labels = df_training[gene_name].values


# -----------------------------------------------------------------------------------
#                         Set the input data space
# -----------------------------------------------------------------------------------
def get_input_data(df: pd.DataFrame, label_col: str):
    scaler = MinMaxScaler(copy=True)
    """ Here we define the data for the VAE we choose to log2 the signal """
    cols_bin = []
    tmp_df = pd.DataFrame()
    non_nan_df = df.copy()
    non_nan_df = non_nan_df.fillna(0)
    for c in df.columns:
        if 'H3K27me3' in c and 'signal' in c and 'brain' in c:
            v = np.log2(non_nan_df[c].values + 1)
            nn_min = np.nanmin(v)
            nn_max = np.nanmax(v)
            tmp_df[f'{c}_log2'] = (v-nn_min) / (nn_max - nn_min)
            cols_bin.append(f'{c}_log2')
        elif ('merged-rep' not in c) and ('log2FoldChange' in c or 'wt' in c or 'ko' in c): 
            cols_bin.append(c)
            v = non_nan_df[c].values
            nn_min = np.nanmin(v)
            nn_max = np.nanmax(v)
            tmp_df[c] = (v-nn_min) / (nn_max - nn_min)
    vae_values = tmp_df[cols_bin].values
    vae_values = np.nan_to_num(vae_values)
    tmp_df[label_col] = df[label_col].values
    return vae_values, tmp_df, df[label_col].values
In [7]:
# # -----------------------------------------------------------------------------------
# #                         Run a test to work out the best number of nodes
# # -----------------------------------------------------------------------------------
# vae_input_values, df_input, labels = get_input_data(df_training, gene_name)
# tsts = [1, 2, 3, 4, 6, 8, 16, 24]
# for i in tsts:
#     for j in range(0, 5):
#         config = {'loss': {'loss_type': 'mse', 'distance_metric': 'mmd', 'mmd_weight': 2.0}, 
#                   'encoding': {'layers': [{'num_nodes': 64, 'activation_fn': 'selu'}, 
#                                           {'num_nodes': 32, 'activation_fn': 'relu'}]}, 
#                   'decoding': {'layers': [{'num_nodes': 32, 'activation_fn': 'relu'},
#                                           {'num_nodes': 64, 'activation_fn': 'selu'}]}, 
#                   'latent': {'num_nodes': i}, 'optimiser': {'params': {}, 'name': 'adam'}}

#         vae_mse = VAE(vae_input_values, vae_input_values, labels, config, f'vae_num-nodes_{i}_rep_{j}')
#         vae_mse.encode('default', epochs=100, batch_size=50,
#                        logging_dir=logging_dir, logfile=f'run_num-nodes_{i}_rep_{j}.csv')

# # -----------------------------------------------------------------------------------
# #                         Plot results
# # -----------------------------------------------------------------------------------

# # Read in each of the csv's and then add a line for each one
# tsts = [1, 2, 3, 4, 6, 8, 16, 24]
# fig, ax = plt.subplots()
# labels = []
# for i, t in enumerate(tsts):
#     c = sci_colour[i]
#     print(c, i)
#     for j in range(0, 5):
#         d = pd.read_csv(f'{logging_dir}run_num-nodes_{t}_rep_{j}.csv')
#         print(f'{logging_dir}run_num-nodes_{t}_rep_{j}.csv')
#         ax.plot(d['epoch'].values, d['loss'].values, c=c, alpha=0.5)
#         label=f'{t} node(s)'
#         if label not in labels:
#             ax.plot(d['epoch'].values, d['val_loss'].values, c=c, alpha=0.8, label=label)
#             labels.append(label)
#         else:
#             ax.plot(d['epoch'].values, d['val_loss'].values, c=c, alpha=0.8)
        
# ax.legend(loc='center left', bbox_to_anchor=(1, 0.5))
# axes = plt.gca()
# axes.set_ylim([0, 5])
# save_fig(f'node_num')
# plt.show()
In [36]:
# -----------------------------------------------------------------------------------
#                         Based on the above, set the number of nodes
#                         1) Build non-linear VAE
#                         2) Build linear VAE
# -----------------------------------------------------------------------------------
num_nodes = 6
vae_input_values, df_input, labels = get_input_data(df_training, gene_name)

config = {'loss': {'loss_type': 'mse', 'distance_metric': 'mmd', 'mmd_weight': 1.0, 
                   'mmcd_method': 'k'}, 
                  'encoding': {'layers': [{'num_nodes': 64, 'activation_fn': 'selu'}, 
                                          {'num_nodes': 32, 'activation_fn': 'relu'}
                                          ]}, 
                  'decoding': {'layers': [
                                          {'num_nodes': 32, 'activation_fn': 'relu'},
                                          {'num_nodes': 64, 'activation_fn': 'selu'}]}, 
                  'latent': {'num_nodes': num_nodes}, 'optimiser': {'params': {}, 'name': 'adam'}}

vae_mse = VAE(vae_input_values, vae_input_values, labels, config, f'final')
if not from_saved:
    vae_mse.encode('default', epochs=250, batch_size=50,
                   logging_dir="final_vae_logs", logfile=f'final.csv')
    vae_mse.save() # save the VAE
    vae_mse.u.dp(["Saved VAE to current directory."])
else:
    vae_mse.u.dp(["Trying to load saved VAE..."])
    vae_mse.load()
    vae_mse.u.dp(["Loaded saved VAE :) "])

df = df_training.copy()

# Encode the values using the VAE
scaler = MinMaxScaler(copy=True)
scaled_vals = scaler.fit_transform(vae_input_values)

vae_data = vae_mse.encode_new_data(scaled_vals)
None
--------------------------------------------------------------------------------
                          Trying to load saved VAE...	                          
--------------------------------------------------------------------------------
Model: "encoder"
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
default_input (InputLayer)      [(None, 97)]         0                                            
__________________________________________________________________________________________________
dense_6 (Dense)                 (None, 64)           6272        default_input[0][0]              
__________________________________________________________________________________________________
dense_7 (Dense)                 (None, 32)           2080        dense_6[0][0]                    
__________________________________________________________________________________________________
z_mean (Dense)                  (None, 6)            198         dense_7[0][0]                    
__________________________________________________________________________________________________
z_log_sigma (Dense)             (None, 6)            198         dense_7[0][0]                    
__________________________________________________________________________________________________
z (Lambda)                      (None, 6)            0           z_mean[0][0]                     
                                                                 z_log_sigma[0][0]                
==================================================================================================
Total params: 8,748
Trainable params: 8,748
Non-trainable params: 0
__________________________________________________________________________________________________
Model: "decoder"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
z_sampling (InputLayer)      [(None, 6)]               0         
_________________________________________________________________
dense_8 (Dense)              (None, 32)                224       
_________________________________________________________________
dense_9 (Dense)              (None, 64)                2112      
_________________________________________________________________
dense_10 (Dense)             (None, 97)                6305      
=================================================================
Total params: 8,641
Trainable params: 8,641
Non-trainable params: 0
_________________________________________________________________
Model: "final_scivae"
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
default_input (InputLayer)      [(None, 97)]         0                                            
__________________________________________________________________________________________________
encoder (Functional)            [(None, 6), (None, 6 8748        default_input[0][0]              
__________________________________________________________________________________________________
decoder (Functional)            (None, 97)           8641        encoder[0][2]                    
__________________________________________________________________________________________________
dense_6 (Dense)                 (None, 64)           6272        default_input[0][0]              
__________________________________________________________________________________________________
dense_7 (Dense)                 (None, 32)           2080        dense_6[0][0]                    
__________________________________________________________________________________________________
z_mean (Dense)                  (None, 6)            198         dense_7[0][0]                    
__________________________________________________________________________________________________
z_log_sigma (Dense)             (None, 6)            198         dense_7[0][0]                    
__________________________________________________________________________________________________
z (Lambda)                      (None, 6)            0           z_mean[0][0]                     
                                                                 z_log_sigma[0][0]                
__________________________________________________________________________________________________
tf_op_layer_Shape_20 (TensorFlo [(2,)]               0           z[0][0]                          
__________________________________________________________________________________________________
tf_op_layer_strided_slice_20 (T [()]                 0           tf_op_layer_Shape_20[0][0]       
__________________________________________________________________________________________________
tf_op_layer_Pack_2 (TensorFlowO [(2,)]               0           tf_op_layer_strided_slice_20[0][0
__________________________________________________________________________________________________
tf_op_layer_RandomStandardNorma [(None, 6)]          0           tf_op_layer_Pack_2[0][0]         
__________________________________________________________________________________________________
tf_op_layer_Mul_6 (TensorFlowOp [(None, 6)]          0           tf_op_layer_RandomStandardNormal_
__________________________________________________________________________________________________
tf_op_layer_Add_2 (TensorFlowOp [(None, 6)]          0           tf_op_layer_Mul_6[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Shape_21 (TensorFlo [(2,)]               0           tf_op_layer_Add_2[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Shape_23 (TensorFlo [(2,)]               0           tf_op_layer_Add_2[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Shape_22 (TensorFlo [(2,)]               0           tf_op_layer_Add_2[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Shape_24 (TensorFlo [(2,)]               0           z[0][0]                          
__________________________________________________________________________________________________
tf_op_layer_Shape_26 (TensorFlo [(2,)]               0           z[0][0]                          
__________________________________________________________________________________________________
tf_op_layer_Shape_25 (TensorFlo [(2,)]               0           z[0][0]                          
__________________________________________________________________________________________________
tf_op_layer_Shape_27 (TensorFlo [(2,)]               0           tf_op_layer_Add_2[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Shape_29 (TensorFlo [(2,)]               0           tf_op_layer_Add_2[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Shape_28 (TensorFlo [(2,)]               0           z[0][0]                          
__________________________________________________________________________________________________
tf_op_layer_strided_slice_21 (T [()]                 0           tf_op_layer_Shape_21[0][0]       
__________________________________________________________________________________________________
tf_op_layer_strided_slice_23 (T [()]                 0           tf_op_layer_Shape_23[0][0]       
__________________________________________________________________________________________________
tf_op_layer_strided_slice_22 (T [()]                 0           tf_op_layer_Shape_22[0][0]       
__________________________________________________________________________________________________
tf_op_layer_strided_slice_24 (T [()]                 0           tf_op_layer_Shape_24[0][0]       
__________________________________________________________________________________________________
tf_op_layer_strided_slice_26 (T [()]                 0           tf_op_layer_Shape_26[0][0]       
__________________________________________________________________________________________________
tf_op_layer_strided_slice_25 (T [()]                 0           tf_op_layer_Shape_25[0][0]       
__________________________________________________________________________________________________
tf_op_layer_strided_slice_27 (T [()]                 0           tf_op_layer_Shape_27[0][0]       
__________________________________________________________________________________________________
tf_op_layer_strided_slice_29 (T [()]                 0           tf_op_layer_Shape_29[0][0]       
__________________________________________________________________________________________________
tf_op_layer_strided_slice_28 (T [()]                 0           tf_op_layer_Shape_28[0][0]       
__________________________________________________________________________________________________
tf_op_layer_Reshape_12/shape (T [(3,)]               0           tf_op_layer_strided_slice_21[0][0
                                                                 tf_op_layer_strided_slice_23[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_13/shape (T [(3,)]               0           tf_op_layer_strided_slice_22[0][0
                                                                 tf_op_layer_strided_slice_23[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_14/shape (T [(3,)]               0           tf_op_layer_strided_slice_24[0][0
                                                                 tf_op_layer_strided_slice_26[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_15/shape (T [(3,)]               0           tf_op_layer_strided_slice_25[0][0
                                                                 tf_op_layer_strided_slice_26[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_16/shape (T [(3,)]               0           tf_op_layer_strided_slice_27[0][0
                                                                 tf_op_layer_strided_slice_29[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_17/shape (T [(3,)]               0           tf_op_layer_strided_slice_28[0][0
                                                                 tf_op_layer_strided_slice_29[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_12 (TensorF [(None, 1, None)]    0           tf_op_layer_Add_2[0][0]          
                                                                 tf_op_layer_Reshape_12/shape[0][0
__________________________________________________________________________________________________
tf_op_layer_Tile_12/multiples ( [(3,)]               0           tf_op_layer_strided_slice_22[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_13 (TensorF [(1, None, None)]    0           tf_op_layer_Add_2[0][0]          
                                                                 tf_op_layer_Reshape_13/shape[0][0
__________________________________________________________________________________________________
tf_op_layer_Tile_13/multiples ( [(3,)]               0           tf_op_layer_strided_slice_21[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_14 (TensorF [(None, 1, None)]    0           z[0][0]                          
                                                                 tf_op_layer_Reshape_14/shape[0][0
__________________________________________________________________________________________________
tf_op_layer_Tile_14/multiples ( [(3,)]               0           tf_op_layer_strided_slice_25[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_15 (TensorF [(1, None, None)]    0           z[0][0]                          
                                                                 tf_op_layer_Reshape_15/shape[0][0
__________________________________________________________________________________________________
tf_op_layer_Tile_15/multiples ( [(3,)]               0           tf_op_layer_strided_slice_24[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_16 (TensorF [(None, 1, None)]    0           tf_op_layer_Add_2[0][0]          
                                                                 tf_op_layer_Reshape_16/shape[0][0
__________________________________________________________________________________________________
tf_op_layer_Tile_16/multiples ( [(3,)]               0           tf_op_layer_strided_slice_28[0][0
__________________________________________________________________________________________________
tf_op_layer_Reshape_17 (TensorF [(1, None, None)]    0           z[0][0]                          
                                                                 tf_op_layer_Reshape_17/shape[0][0
__________________________________________________________________________________________________
tf_op_layer_Tile_17/multiples ( [(3,)]               0           tf_op_layer_strided_slice_27[0][0
__________________________________________________________________________________________________
tf_op_layer_Tile_12 (TensorFlow [(None, None, None)] 0           tf_op_layer_Reshape_12[0][0]     
                                                                 tf_op_layer_Tile_12/multiples[0][
__________________________________________________________________________________________________
tf_op_layer_Tile_13 (TensorFlow [(None, None, None)] 0           tf_op_layer_Reshape_13[0][0]     
                                                                 tf_op_layer_Tile_13/multiples[0][
__________________________________________________________________________________________________
tf_op_layer_Tile_14 (TensorFlow [(None, None, None)] 0           tf_op_layer_Reshape_14[0][0]     
                                                                 tf_op_layer_Tile_14/multiples[0][
__________________________________________________________________________________________________
tf_op_layer_Tile_15 (TensorFlow [(None, None, None)] 0           tf_op_layer_Reshape_15[0][0]     
                                                                 tf_op_layer_Tile_15/multiples[0][
__________________________________________________________________________________________________
tf_op_layer_Tile_16 (TensorFlow [(None, None, None)] 0           tf_op_layer_Reshape_16[0][0]     
                                                                 tf_op_layer_Tile_16/multiples[0][
__________________________________________________________________________________________________
tf_op_layer_Tile_17 (TensorFlow [(None, None, None)] 0           tf_op_layer_Reshape_17[0][0]     
                                                                 tf_op_layer_Tile_17/multiples[0][
__________________________________________________________________________________________________
tf_op_layer_Sub_10 (TensorFlowO [(None, None, None)] 0           tf_op_layer_Tile_12[0][0]        
                                                                 tf_op_layer_Tile_13[0][0]        
__________________________________________________________________________________________________
tf_op_layer_Sub_11 (TensorFlowO [(None, None, None)] 0           tf_op_layer_Tile_14[0][0]        
                                                                 tf_op_layer_Tile_15[0][0]        
__________________________________________________________________________________________________
tf_op_layer_Sub_12 (TensorFlowO [(None, None, None)] 0           tf_op_layer_Tile_16[0][0]        
                                                                 tf_op_layer_Tile_17[0][0]        
__________________________________________________________________________________________________
tf_op_layer_Square_8 (TensorFlo [(None, None, None)] 0           tf_op_layer_Sub_10[0][0]         
__________________________________________________________________________________________________
tf_op_layer_Square_9 (TensorFlo [(None, None, None)] 0           tf_op_layer_Sub_11[0][0]         
__________________________________________________________________________________________________
tf_op_layer_Square_10 (TensorFl [(None, None, None)] 0           tf_op_layer_Sub_12[0][0]         
__________________________________________________________________________________________________
tf_op_layer_Mean_14 (TensorFlow [(None, None)]       0           tf_op_layer_Square_8[0][0]       
__________________________________________________________________________________________________
tf_op_layer_Mean_15 (TensorFlow [(None, None)]       0           tf_op_layer_Square_9[0][0]       
__________________________________________________________________________________________________
tf_op_layer_Mean_16 (TensorFlow [(None, None)]       0           tf_op_layer_Square_10[0][0]      
__________________________________________________________________________________________________
tf_op_layer_Neg_6 (TensorFlowOp [(None, None)]       0           tf_op_layer_Mean_14[0][0]        
__________________________________________________________________________________________________
tf_op_layer_Cast_6 (TensorFlowO [()]                 0           tf_op_layer_strided_slice_23[0][0
__________________________________________________________________________________________________
tf_op_layer_Neg_7 (TensorFlowOp [(None, None)]       0           tf_op_layer_Mean_15[0][0]        
__________________________________________________________________________________________________
tf_op_layer_Cast_7 (TensorFlowO [()]                 0           tf_op_layer_strided_slice_26[0][0
__________________________________________________________________________________________________
tf_op_layer_Neg_8 (TensorFlowOp [(None, None)]       0           tf_op_layer_Mean_16[0][0]        
__________________________________________________________________________________________________
tf_op_layer_Cast_8 (TensorFlowO [()]                 0           tf_op_layer_strided_slice_29[0][0
__________________________________________________________________________________________________
tf_op_layer_RealDiv_6 (TensorFl [(None, None)]       0           tf_op_layer_Neg_6[0][0]          
                                                                 tf_op_layer_Cast_6[0][0]         
__________________________________________________________________________________________________
tf_op_layer_RealDiv_7 (TensorFl [(None, None)]       0           tf_op_layer_Neg_7[0][0]          
                                                                 tf_op_layer_Cast_7[0][0]         
__________________________________________________________________________________________________
tf_op_layer_RealDiv_8 (TensorFl [(None, None)]       0           tf_op_layer_Neg_8[0][0]          
                                                                 tf_op_layer_Cast_8[0][0]         
__________________________________________________________________________________________________
tf_op_layer_Exp_6 (TensorFlowOp [(None, None)]       0           tf_op_layer_RealDiv_6[0][0]      
__________________________________________________________________________________________________
tf_op_layer_Exp_7 (TensorFlowOp [(None, None)]       0           tf_op_layer_RealDiv_7[0][0]      
__________________________________________________________________________________________________
tf_op_layer_Exp_8 (TensorFlowOp [(None, None)]       0           tf_op_layer_RealDiv_8[0][0]      
__________________________________________________________________________________________________
tf_op_layer_Mean_17 (TensorFlow [()]                 0           tf_op_layer_Exp_6[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Mean_18 (TensorFlow [()]                 0           tf_op_layer_Exp_7[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Mean_19 (TensorFlow [()]                 0           tf_op_layer_Exp_8[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Sub_14 (TensorFlowO [(None, 97)]         0           default_input[0][0]              
                                                                 decoder[0][0]                    
__________________________________________________________________________________________________
tf_op_layer_AddV2_4 (TensorFlow [()]                 0           tf_op_layer_Mean_17[0][0]        
                                                                 tf_op_layer_Mean_18[0][0]        
__________________________________________________________________________________________________
tf_op_layer_Mul_7 (TensorFlowOp [()]                 0           tf_op_layer_Mean_19[0][0]        
__________________________________________________________________________________________________
tf_op_layer_Square_11 (TensorFl [(None, 97)]         0           tf_op_layer_Sub_14[0][0]         
__________________________________________________________________________________________________
tf_op_layer_Sub_13 (TensorFlowO [()]                 0           tf_op_layer_AddV2_4[0][0]        
                                                                 tf_op_layer_Mul_7[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Sum_2 (TensorFlowOp [(None,)]            0           tf_op_layer_Square_11[0][0]      
__________________________________________________________________________________________________
tf_op_layer_Mul_8 (TensorFlowOp [()]                 0           tf_op_layer_Sub_13[0][0]         
__________________________________________________________________________________________________
tf_op_layer_AddV2_5 (TensorFlow [(None,)]            0           tf_op_layer_Sum_2[0][0]          
                                                                 tf_op_layer_Mul_8[0][0]          
__________________________________________________________________________________________________
tf_op_layer_Mean_20 (TensorFlow [()]                 0           tf_op_layer_AddV2_5[0][0]        
__________________________________________________________________________________________________
add_loss_2 (AddLoss)            ()                   0           tf_op_layer_Mean_20[0][0]        
==================================================================================================
Total params: 17,389
Trainable params: 17,389
Non-trainable params: 0
__________________________________________________________________________________________________
None
--------------------------------------------------------------------------------
                             Loaded saved VAE :) 	                              
--------------------------------------------------------------------------------

4) Setup data for visualisations

Here we setup the data and summarise key features, for example calcualting the median values.

We do this so we can easily access these later.

In [10]:
# -----------------------------------------------------------------------------------
#                         Data setup for Vis
# -----------------------------------------------------------------------------------

hist_metric = 'signal'
input_cols = list(df_input.columns)


def get_median(df, mark, time="", tissue="brain"):
    cols = []
    for c in df.columns:
        if tissue in c and mark in c and hist_metric in c and time in c and 'median' not in c:
            cols.append(c)
    # get nan median
    vals = np.nanmedian(df[cols].values, axis=1)
    
    return np.nan_to_num(vals)

marks = ['H3K27me3', 'H3K4me1', 'H3K4me2', 'H3K4me3', 'H3K27ac', 'H3K9me3', 'H3K36me3', 'H3K9ac']

# Get the median over all time points and all brain tissues
for m in marks:
    df[f'{m}'] = get_median(df, m, time="", tissue="brain")
    
times = ['10.5', '11.5', '12.5', '13.5', '14.5', '15.5', '16.5']
for m in marks:
    for e in times:
        df[f'median_brain_{e}_signal_{m}'] = get_median(df, m, time=e, tissue="brain")
    
tissues = ['hindbrain', 'midbrain', 'forebrain']
for m in marks:
    for e in times:
        for t in tissues:
            df[f'median_{t}_{e}_signal_{m}'] = get_median(df, m, time=e, tissue=t)


df['mean_wt'] = np.mean(df[[c for c in df.columns if 'wt' in c]].values, axis=1)
df['mean_ko'] = np.mean(df[[c for c in df.columns if 'ko' in c]].values, axis=1)
df['mean_ko-wt'] = df['mean_ko'].values - df['mean_wt'].values

# Add in the VAE columns 
for v in range(0, len(vae_data[0])):
    df[f'VAE{v}'] = vae_data[:, v]

# Rename/add some columns just to make figs easier
df['Log2FC FB'] = df['log2FoldChange_fb'].values
df['Log2FC MB'] = df['log2FoldChange_mb'].values
df['Log2FC HB'] = df['log2FoldChange_hb'].values
df['Log2FC SC'] = df['log2FoldChange_sc'].values
df['Log2FC A11'] = df['log2FoldChange_a11'].values
df['Log2FC A13'] = df['log2FoldChange_a13'].values
df['Log2FC A15'] = df['log2FoldChange_a15'].values
df['Log2FC A18'] = df['log2FoldChange_a18'].values
df['Log2FC P11'] = df['log2FoldChange_p11'].values
df['Log2FC P13'] = df['log2FoldChange_p13'].values
df['Log2FC P15'] = df['log2FoldChange_p15'].values
df['Log2FC P18'] = df['log2FoldChange_p18'].values

all_cols = [
    'H3K9me3',
    'H3K4me1', 
    'H3K4me2', 
    'H3K4me3', 
    'H3K27ac',
    'H3K36me3', 
    'H3K9ac',
    'mean_wt',
    'mean_ko',
    'mean_ko-wt',
    'H3K27me3',
    'Log2FC FB',
    'Log2FC MB',
    'Log2FC HB',
    'Log2FC SC',
    'VAE0',
    'VAE1',
    'VAE2',
    'Log2FC A11',
    'Log2FC A13',
    'Log2FC A15',
    'Log2FC A18',
    'Log2FC P11',
    'Log2FC P13',
    'Log2FC P15',
    'Log2FC P18'
]
unobserved_cols = [
    'H3K9me3',
    'H3K4me1', 
    'H3K4me2', 
    'H3K4me3', 
    'H3K27ac',
    'H3K36me3', 
    'H3K9ac',
    'mean_wt',
    'mean_ko',
    'mean_ko-wt'
]

observed_cols = [
    'H3K4me1', 
    'H3K4me2', 
    'H3K4me3', 
    'H3K27ac',
    'H3K36me3', 
    'H3K27me3',
    'Log2FC FB',
    'Log2FC MB',
    'Log2FC HB',
    'Log2FC SC',
    'VAE0',
    'VAE1',
    'VAE2'
]

hist_cols = [
    'H3K9me3',
    'H3K4me1', 
    'H3K4me2', 
    'H3K4me3', 
    'H3K27ac',
    'H3K36me3', 
    'H3K27me3',
    'H3K9ac'
]

div_cols = [
    'Log2FC FB',
    'Log2FC MB',
    'Log2FC HB',
    'Log2FC SC',
    'Log2FC A11',
    'Log2FC A13',
    'Log2FC A15',
    'Log2FC A18',
    'Log2FC P11',
    'Log2FC P13',
    'Log2FC P15',
    'Log2FC P18',
]

raw_cols = [
    'mean_wt',
    'mean_ko'
]
vae_cols = observed_cols
df_unobserved = df[unobserved_cols]
df_observed = df[observed_cols]
observed_dict = {}

for c in observed_cols:
    observed_dict[c] = df_observed[c].values
unobserved_dict = {}
for c in unobserved_cols:
    unobserved_dict[c] = df_unobserved[c].values
    
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1113: RuntimeWarning: Mean of empty slice
  return np.nanmean(a, axis, out=out, keepdims=keepdims)

4) Plot the correlations for the latent nodes with data features

Here we want to plot how correlated each node is with the mean values of different epigenetic marks & also the means of input features in the dataset.

We also plot the latent space coloured by each of the features (both observed and unobserved).

Lastly, we plot heatmaps of the input, latent and decoding results for key marker genes so that we can work out whether our model is logical. These same genes are also projected onto the latent space where we can see that the different classes of markers (e.g. Hox genes vs brain genes) are easily discernable.

In [11]:
# -----------------------------------------------------------------------------------
#                         Plot scatter of the features
# -----------------------------------------------------------------------------------
all_vae_data = np.copy(vae_data)
vae_data = all_vae_data[:, 0:3]
vae_vis = VVis(vae_mse, u, None)
div_cmap = 'seismic'

feature_obs_ax = vae_vis.plot_feature_scatters(df, "", columns=hist_cols, vae_data=vae_data, 
                                               show_plt=False, output_dir=fig_dir, fig_type="svg", 
                                               save_fig=False, title=f'{experiment_name}',
                                               angle_plot=315, cmap=hist_cmap, vmin=0, vmax=10)

feature_obs_ax = vae_vis.plot_feature_scatters(df, "", columns=div_cols, vae_data=vae_data, 
                                               show_plt=False, output_dir=fig_dir, fig_type="svg", 
                                               save_fig=False, title=f'{experiment_name}',
                                               angle_plot=315, cmap=div_cmap, vmin=-10, vmax=10)

feature_obs_ax = vae_vis.plot_feature_scatters(df, "", columns=raw_cols, vae_data=vae_data, 
                                               show_plt=False, output_dir=fig_dir, fig_type="svg", 
                                               save_fig=False, title=f'{experiment_name}',
                                               angle_plot=315, cmap=rna_cmap, vmin=0, vmax=10)

# -----------------------------------------------------------------------------------
#                         Plot histograms
# -----------------------------------------------------------------------------------
vae_vis.plot_node_hists(show_plt=True, save_fig=False)
vae_vis.plot_input_distribution(df_observed, show_plt=True, save_fig=True, output_dir=fig_dir)
vae_vis.plot_input_distribution(df_unobserved, show_plt=True, output_dir=fig_dir, save_fig=True)

# -----------------------------------------------------------------------------------
#                         Plot correlations
# -----------------------------------------------------------------------------------
vae_vis.plot_node_correlation(show_plt=True, save_fig=False)

vae_vis.plot_node_feature_correlation(df_observed, '', columns=observed_cols, vae_data=vae_data, 
                                  show_plt=True, output_dir=fig_dir, save_fig=True, 
                                      title=f'Node vs observed features {experiment_name}', cmap=div_cmap)

vae_vis.plot_feature_correlation(df_observed, '', columns=observed_cols, show_plt=True, cmap=div_cmap,
                                 title=f'Feature vs observed features {experiment_name}',
                             output_dir=fig_dir, save_fig=True)

vae_vis.plot_node_feature_correlation(df_unobserved, '', columns=unobserved_cols, vae_data=vae_data, 
                                      cmap=div_cmap,
                                      show_plt=True, output_dir=fig_dir, save_fig=True,
                                      title=f'Node vs unobserved features {experiment_name}')

vae_vis.plot_feature_correlation(df_unobserved, '', columns=unobserved_cols, show_plt=True, cmap=div_cmap,
                             output_dir=fig_dir, save_fig=True, title=f'feature un-observed features {experiment_name}')

vae_vis.plot_feature_correlation(df, '', columns=unobserved_cols + observed_cols, show_plt=True, cmap=div_cmap,
                             output_dir=fig_dir, save_fig=True, title=f'features all {experiment_name}')
        
vae_vis.plot_feature_correlation(df, '', columns=vae_cols, show_plt=True, cmap=div_cmap,
                             output_dir=fig_dir, save_fig=True, title=f'features VAE {experiment_name}')
# -----------------------------------------------------------------------------------
#                         Plot heatmaps of marker genes
# -----------------------------------------------------------------------------------
fb_genes = ['Foxg1']
mb_genes = ['En2']
hb_genes = ['Sox3']
sc_genes = ['Hoxc9']
input_cols = [c for c in df_input.columns if c != gene_name]

merged_cols = [c for c in df.columns if "merged" in c]
# Plot the input space
plot_gene_heatmap(df, fb_genes, mb_genes, hb_genes, sc_genes, 
                  merged_cols, vae_data, vae_mse,
                  gene_name, mark='H3K27me3', method='input', cmap=hist_cmap)

# Plot the decoding space
plot_gene_heatmap(df_input, fb_genes, mb_genes, hb_genes, sc_genes, 
                  input_cols, all_vae_data, vae_mse, 
                  gene_name, mark='H3K27me3', method='decoding', cmap=div_cmap)

# Plot the latent space
plot_gene_heatmap(df, fb_genes, mb_genes, hb_genes, sc_genes, 
                  ['VAE0', 'VAE1', 'VAE2'], all_vae_data, vae_mse, 
                  gene_name, mark='H3K27me3', method='latent', cmap=hist_cmap)

# Also do the main markers
fb_genes = ['Emx1', 'Eomes', 'Tbr1', 'Foxg1', 'Lhx6']
mb_genes = ['En1', 'En2', 'Lmx1a', 'Bhlhe23', 'Sall4']
hb_genes = ['Phox2b', 'Krox20', 'Fev', 'Hoxb1',  'Hoxd3']
sc_genes = ['Hoxd8', 'Hoxd9', 'Hoxd10', 'Hoxd11','Hoxa7', 'Hoxa9', 'Hoxa10',
              'Hoxb9', 'Hoxb13',  'Hoxc8', 'Hoxc9', 'Hoxc10', 'Hoxc11', 'Hoxc12', 'Hoxc13']
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/scivae/vis.py:351: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
  fig = plt.figure()
<Figure size 216x216 with 0 Axes>
<Figure size 144x144 with 0 Axes>
<Figure size 144x144 with 0 Axes>
<Figure size 144x144 with 0 Axes>
<Figure size 144x144 with 0 Axes>
<Figure size 144x144 with 0 Axes>
<Figure size 144x144 with 0 Axes>
<Figure size 144x144 with 0 Axes>
<Figure size 144x144 with 0 Axes>
<Figure size 144x144 with 0 Axes>
1 1 1.0 0.0
1 2 -0.4611195178261902 0.0
1 3 0.05533336975491254 3.759245842454331e-10
1 4 0.27586538605877986 3.075276550274219e-222
1 5 -0.18109363771433745 8.802352668070395e-95
1 6 -0.13762681747260536 3.776931901875061e-55
2 1 -0.46111951782619026 0.0
2 2 1.0 0.0
2 3 -0.30755439448260075 1.90016526480016e-278
2 4 -0.24646661265713876 2.1693580696733827e-176
2 5 -0.34708752757951433 0.0
2 6 0.020714562085948497 0.019112315066020628
3 1 0.05533336975491255 3.759245842454304e-10
3 2 -0.30755439448260075 1.90016526480016e-278
3 3 1.0 0.0
3 4 -0.3903355408277292 0.0
3 5 -0.05517637665402916 4.2133655185972913e-10
3 6 0.33611916023852745 0.0
4 1 0.27586538605877986 3.075276550274219e-222
4 2 -0.24646661265713876 2.1693580696733827e-176
4 3 -0.3903355408277292 0.0
4 4 1.0 0.0
4 5 -0.04183460941426989 2.200279429316919e-06
4 6 0.0757405049538823 9.525008131595028e-18
5 1 -0.18109363771433745 8.802352668070395e-95
5 2 -0.3470875275795143 0.0
5 3 -0.05517637665402916 4.2133655185972913e-10
5 4 -0.04183460941426989 2.200279429316919e-06
5 5 1.0 0.0
5 6 -0.13218363801904903 5.631422810358628e-51
6 1 -0.13762681747260536 3.776931901875061e-55
6 2 0.020714562085948497 0.019112315066020628
6 3 0.3361191602385275 0.0
6 4 0.0757405049538823 9.525008131595028e-18
6 5 -0.13218363801904903 5.631422810358628e-51
6 6 1.0 0.0
<Figure size 216x216 with 0 Axes>
1 H3K4me1 -0.013568556295341615 0.12482123994503176
1 H3K4me2 0.18887754682460808 4.3799637480020857e-103
1 H3K4me3 -0.06585650111025299 8.830832983169246e-14
1 H3K27ac -0.021472303565038334 0.01513753080634104
1 H3K36me3 -0.14637831865282763 3.1818613224446687e-62
1 H3K27me3 0.5530783713203921 0.0
1 Log2FC FB 0.23386004862667245 1.6353603410522057e-158
1 Log2FC MB 0.09497872033347349 4.893067037273455e-27
1 Log2FC HB -0.06055799388753807 7.072852121471026e-12
1 Log2FC SC 0.06903724913680313 5.353138003220564e-15
1 VAE0 1.0 0.0
1 VAE1 -0.46110326962849063 0.0
1 VAE2 0.0553254384134554 3.7809955029025667e-10
2 H3K4me1 -0.031975417695767415 0.00029717150125224174
2 H3K4me2 -0.19240476207447962 5.701135438643352e-107
2 H3K4me3 0.18648158069639809 1.7257177250362483e-100
2 H3K27ac 0.16479213573088783 1.3658104535434414e-78
2 H3K36me3 0.2773544371972296 1.0166011378721364e-224
2 H3K27me3 -0.8554111444358766 0.0
2 Log2FC FB -0.42031788136966924 0.0
2 Log2FC MB -0.3835940752982142 0.0
2 Log2FC HB -0.25178163304077034 3.0367592025966925e-184
2 Log2FC SC -0.35928593051293045 0.0
2 VAE0 -0.46110326962849063 0.0
2 VAE1 1.0 0.0
2 VAE2 -0.3076063848742393 1.5155595210118842e-278
3 H3K4me1 -0.07362293623376154 7.491335391145723e-17
3 H3K4me2 -0.09528118666911108 3.36413886621527e-27
3 H3K4me3 -0.4574592637070526 0.0
3 H3K27ac -0.4181662263570533 0.0
3 H3K36me3 -0.44625458684523317 0.0
3 H3K27me3 0.3788059166332001 0.0
3 Log2FC FB 0.5571965727331442 0.0
3 Log2FC MB 0.40768272856880644 0.0
3 Log2FC HB 0.23197909457281732 6.183849194431829e-156
3 Log2FC SC 0.44749145769593274 0.0
3 VAE0 0.0553254384134554 3.7809955029025667e-10
3 VAE1 -0.3076063848742393 1.5155595210118842e-278
3 VAE2 1.0 0.0
<Figure size 144x144 with 0 Axes>
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K27me3 0.03880145459733418 1.1304167715365197e-05
H3K4me1 Log2FC FB -0.14880590787152698 2.8859404622978633e-64
H3K4me1 Log2FC MB -0.10387373575786396 4.872008964191265e-32
H3K4me1 Log2FC HB -0.05777615219411477 6.12378414825415e-11
H3K4me1 Log2FC SC -0.07950151137451965 2.1197279496874784e-19
H3K4me1 VAE0 -0.013568556295341615 0.12482123994503176
H3K4me1 VAE1 -0.031975417695767415 0.00029717150125224174
H3K4me1 VAE2 -0.07362293623376154 7.491335391145723e-17
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K27me3 0.1836859102996935 1.6625204625607636e-97
H3K4me2 Log2FC FB -0.12969526458358954 3.9896551047753745e-49
H3K4me2 Log2FC MB -0.09642120978180409 8.108800676805556e-28
H3K4me2 Log2FC HB -0.10550208768149451 5.2879602412044856e-33
H3K4me2 Log2FC SC -0.08178812465927765 1.9179743858493656e-20
H3K4me2 VAE0 0.18887754682460806 4.3799637480023355e-103
H3K4me2 VAE1 -0.1924047620744796 5.701135438644e-107
H3K4me2 VAE2 -0.09528118666911108 3.36413886621527e-27
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K27me3 -0.28958561139696254 1.0906807671975684e-245
H3K4me3 Log2FC FB -0.4470506488127457 0.0
H3K4me3 Log2FC MB -0.4473702882601094 0.0
H3K4me3 Log2FC HB -0.41979679249095553 0.0
H3K4me3 Log2FC SC -0.3297606127199917 0.0
H3K4me3 VAE0 -0.06585650111025297 8.830832983169405e-14
H3K4me3 VAE1 0.18648158069639809 1.7257177250362483e-100
H3K4me3 VAE2 -0.45745926370705253 0.0
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K27me3 -0.2526689336918533 1.4216280599037781e-185
H3K27ac Log2FC FB -0.3815669720025924 0.0
H3K27ac Log2FC MB -0.42208837018425827 0.0
H3K27ac Log2FC HB -0.408298389874337 0.0
H3K27ac Log2FC SC -0.2977765740809075 2.491982785246384e-260
H3K27ac VAE0 -0.021472303565038334 0.01513753080634104
H3K27ac VAE1 0.16479213573088783 1.3658104535434414e-78
H3K27ac VAE2 -0.41816622635705336 0.0
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K27me3 -0.35415360112947697 0.0
H3K36me3 Log2FC FB -0.4744138412763159 0.0
H3K36me3 Log2FC MB -0.430059873023584 0.0
H3K36me3 Log2FC HB -0.3634108408611482 0.0
H3K36me3 Log2FC SC -0.33209079328572233 0.0
H3K36me3 VAE0 -0.14637831865282763 3.1818613224446687e-62
H3K36me3 VAE1 0.2773544371972295 1.0166011378724836e-224
H3K36me3 VAE2 -0.44625458684523317 0.0
H3K27me3 H3K4me1 0.03880145459733418 1.1304167715365197e-05
H3K27me3 H3K4me2 0.18368591029969353 1.662520462560716e-97
H3K27me3 H3K4me3 -0.2895856113969625 1.0906807671978166e-245
H3K27me3 H3K27ac -0.2526689336918533 1.4216280599037781e-185
H3K27me3 H3K36me3 -0.35415360112947697 0.0
H3K27me3 H3K27me3 1.0 0.0
H3K27me3 Log2FC FB 0.37643342244583206 0.0
H3K27me3 Log2FC MB 0.3225460106810916 1.314030964712288e-307
H3K27me3 Log2FC HB 0.2347875537574898 8.590917791342444e-160
H3K27me3 Log2FC SC 0.2956826706138225 1.5329233866307224e-256
H3K27me3 VAE0 0.5530783713203921 0.0
H3K27me3 VAE1 -0.8554111444358766 0.0
H3K27me3 VAE2 0.3788059166332001 0.0
Log2FC FB H3K4me1 -0.14880590787152698 2.8859404622978633e-64
Log2FC FB H3K4me2 -0.12969526458358954 3.9896551047753745e-49
Log2FC FB H3K4me3 -0.4470506488127457 0.0
Log2FC FB H3K27ac -0.3815669720025924 0.0
Log2FC FB H3K36me3 -0.4744138412763159 0.0
Log2FC FB H3K27me3 0.37643342244583206 0.0
Log2FC FB Log2FC FB 1.0 0.0
Log2FC FB Log2FC MB 0.7040491449224625 0.0
Log2FC FB Log2FC HB 0.5367783316680511 0.0
Log2FC FB Log2FC SC 0.5730464144717174 0.0
Log2FC FB VAE0 0.23386004862667242 1.6353603410522057e-158
Log2FC FB VAE1 -0.42031788136966924 0.0
Log2FC FB VAE2 0.5571965727331442 0.0
Log2FC MB H3K4me1 -0.10387373575786396 4.872008964191265e-32
Log2FC MB H3K4me2 -0.09642120978180409 8.108800676805556e-28
Log2FC MB H3K4me3 -0.44737028826010944 0.0
Log2FC MB H3K27ac -0.4220883701842583 0.0
Log2FC MB H3K36me3 -0.43005987302358406 0.0
Log2FC MB H3K27me3 0.32254601068109157 1.314030964712587e-307
Log2FC MB Log2FC FB 0.7040491449224625 0.0
Log2FC MB Log2FC MB 0.9999999999999999 0.0
Log2FC MB Log2FC HB 0.7578212671301587 0.0
Log2FC MB Log2FC SC 0.5751592030701783 0.0
Log2FC MB VAE0 0.09497872033347349 4.893067037273455e-27
Log2FC MB VAE1 -0.38359407529821415 0.0
Log2FC MB VAE2 0.4076827285688065 0.0
Log2FC HB H3K4me1 -0.05777615219411477 6.12378414825415e-11
Log2FC HB H3K4me2 -0.10550208768149451 5.2879602412044856e-33
Log2FC HB H3K4me3 -0.4197967924909555 0.0
Log2FC HB H3K27ac -0.408298389874337 0.0
Log2FC HB H3K36me3 -0.36341084086114817 0.0
Log2FC HB H3K27me3 0.2347875537574898 8.590917791342444e-160
Log2FC HB Log2FC FB 0.5367783316680511 0.0
Log2FC HB Log2FC MB 0.7578212671301588 0.0
Log2FC HB Log2FC HB 1.0 0.0
Log2FC HB Log2FC SC 0.47172347343211496 0.0
Log2FC HB VAE0 -0.060557993887538075 7.072852121470975e-12
Log2FC HB VAE1 -0.2517816330407703 3.0367592025972104e-184
Log2FC HB VAE2 0.23197909457281732 6.183849194431829e-156
Log2FC SC H3K4me1 -0.07950151137451963 2.1197279496875092e-19
Log2FC SC H3K4me2 -0.08178812465927764 1.9179743858494207e-20
Log2FC SC H3K4me3 -0.3297606127199917 0.0
Log2FC SC H3K27ac -0.2977765740809076 2.4919827852461e-260
Log2FC SC H3K36me3 -0.33209079328572233 0.0
Log2FC SC H3K27me3 0.2956826706138225 1.5329233866307224e-256
Log2FC SC Log2FC FB 0.5730464144717174 0.0
Log2FC SC Log2FC MB 0.5751592030701783 0.0
Log2FC SC Log2FC HB 0.47172347343211496 0.0
Log2FC SC Log2FC SC 0.9999999999999999 0.0
Log2FC SC VAE0 0.06903724913680313 5.353138003220564e-15
Log2FC SC VAE1 -0.35928593051293045 0.0
Log2FC SC VAE2 0.4474914576959328 0.0
VAE0 H3K4me1 -0.013568556295341615 0.12482123994503176
VAE0 H3K4me2 0.18887754682460808 4.3799637480020857e-103
VAE0 H3K4me3 -0.06585650111025299 8.830832983169246e-14
VAE0 H3K27ac -0.021472303565038334 0.01513753080634104
VAE0 H3K36me3 -0.14637831865282763 3.1818613224446687e-62
VAE0 H3K27me3 0.5530783713203921 0.0
VAE0 Log2FC FB 0.23386004862667245 1.6353603410522057e-158
VAE0 Log2FC MB 0.09497872033347349 4.893067037273455e-27
VAE0 Log2FC HB -0.06055799388753807 7.072852121471026e-12
VAE0 Log2FC SC 0.06903724913680313 5.353138003220564e-15
VAE0 VAE0 1.0 0.0
VAE0 VAE1 -0.46110326962849063 0.0
VAE0 VAE2 0.0553254384134554 3.7809955029025667e-10
VAE1 H3K4me1 -0.031975417695767415 0.00029717150125224174
VAE1 H3K4me2 -0.19240476207447962 5.701135438643352e-107
VAE1 H3K4me3 0.18648158069639809 1.7257177250362483e-100
VAE1 H3K27ac 0.16479213573088783 1.3658104535434414e-78
VAE1 H3K36me3 0.2773544371972296 1.0166011378721364e-224
VAE1 H3K27me3 -0.8554111444358766 0.0
VAE1 Log2FC FB -0.42031788136966924 0.0
VAE1 Log2FC MB -0.3835940752982142 0.0
VAE1 Log2FC HB -0.25178163304077034 3.0367592025966925e-184
VAE1 Log2FC SC -0.35928593051293045 0.0
VAE1 VAE0 -0.46110326962849063 0.0
VAE1 VAE1 1.0 0.0
VAE1 VAE2 -0.3076063848742393 1.5155595210118842e-278
VAE2 H3K4me1 -0.07362293623376154 7.491335391145723e-17
VAE2 H3K4me2 -0.09528118666911108 3.36413886621527e-27
VAE2 H3K4me3 -0.4574592637070526 0.0
VAE2 H3K27ac -0.4181662263570533 0.0
VAE2 H3K36me3 -0.44625458684523317 0.0
VAE2 H3K27me3 0.3788059166332001 0.0
VAE2 Log2FC FB 0.5571965727331442 0.0
VAE2 Log2FC MB 0.40768272856880644 0.0
VAE2 Log2FC HB 0.23197909457281732 6.183849194431829e-156
VAE2 Log2FC SC 0.44749145769593274 0.0
VAE2 VAE0 0.0553254384134554 3.7809955029025667e-10
VAE2 VAE1 -0.3076063848742393 1.5155595210118842e-278
VAE2 VAE2 1.0 0.0
<Figure size 216x216 with 0 Axes>
1 H3K9me3 0.08868709764477078 9.052169614398737e-24
1 H3K4me1 -0.013568556295341615 0.12482123994503176
1 H3K4me2 0.18887754682460808 4.3799637480020857e-103
1 H3K4me3 -0.06585650111025299 8.830832983169246e-14
1 H3K27ac -0.021472303565038334 0.01513753080634104
1 H3K36me3 -0.14637831865282763 3.1818613224446687e-62
1 H3K9ac 0.03285021641590677 0.0002017762346797588
1 mean_wt -0.00021661115554007013 0.9804525957654797
1 mean_ko 0.018585159776955285 0.035518200971411784
1 mean_ko-wt 0.1828757922191852 1.1924095439788549e-96
2 H3K9me3 -0.08196466377555486 1.58878405718112e-20
2 H3K4me1 -0.031975417695767415 0.00029717150125224174
2 H3K4me2 -0.19240476207447962 5.701135438643352e-107
2 H3K4me3 0.18648158069639809 1.7257177250362483e-100
2 H3K27ac 0.16479213573088783 1.3658104535434414e-78
2 H3K36me3 0.2773544371972296 1.0166011378721364e-224
2 H3K9ac 0.11449876932898181 1.3228165517572424e-38
2 mean_wt 0.03729130482907743 2.4474637045818884e-05
2 mean_ko -0.02416281411573904 0.006266093179797714
2 mean_ko-wt -0.4787380546344486 0.0
3 H3K9me3 0.07867195641802002 4.984097779369759e-19
3 H3K4me1 -0.07362293623376154 7.491335391145723e-17
3 H3K4me2 -0.09528118666911108 3.36413886621527e-27
3 H3K4me3 -0.4574592637070526 0.0
3 H3K27ac -0.4181662263570533 0.0
3 H3K36me3 -0.44625458684523317 0.0
3 H3K9ac -0.3957199151340928 0.0
3 mean_wt -0.5441905202636792 0.0
3 mean_ko -0.5085969664258713 0.0
3 mean_ko-wt 0.5164362537253868 0.0
<Figure size 144x144 with 0 Axes>
H3K9me3 H3K9me3 1.0 0.0
H3K9me3 H3K4me1 -0.14322560612182772 1.2682004430470273e-59
H3K9me3 H3K4me2 -0.012727232249096996 0.14996053879600038
H3K9me3 H3K4me3 -0.031174294277473532 0.0004201886170928389
H3K9me3 H3K27ac -0.00358288782217438 0.6852778158564187
H3K9me3 H3K36me3 -0.08596619953337728 1.9975762016514672e-22
H3K9me3 H3K9ac 0.0006515620935032757 0.9412490950421215
H3K9me3 mean_wt -0.005812182301496531 0.5108995655637896
H3K9me3 mean_ko 0.0012293357691734912 0.8894077672281322
H3K9me3 mean_ko-wt 0.07171376981069018 4.577998673738538e-16
H3K4me1 H3K9me3 -0.14322560612182772 1.2682004430470273e-59
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K9ac 0.2614374133944155 5.329955864994627e-199
H3K4me1 mean_wt 0.11747411642321601 1.4678426946564922e-40
H3K4me1 mean_ko 0.11010738724216297 8.198213479177807e-36
H3K4me1 mean_ko-wt -0.12351444023102397 1.0993490972728222e-44
H3K4me2 H3K9me3 -0.012727232249096996 0.14996053879600038
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K9ac 0.468787932774562 0.0
H3K4me2 mean_wt 0.18397384400291664 8.235251256534976e-98
H3K4me2 mean_ko 0.17946752733713214 4.2877666356691384e-93
H3K4me2 mean_ko-wt -0.09888737471837038 3.5238851765166497e-29
H3K4me3 H3K9me3 -0.031174294277473535 0.0004201886170928379
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K9ac 0.8372246669947291 0.0
H3K4me3 mean_wt 0.6172021315146129 0.0
H3K4me3 mean_ko 0.588174302010897 0.0
H3K4me3 mean_ko-wt -0.48552252459057177 0.0
H3K27ac H3K9me3 -0.00358288782217438 0.6852778158564187
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K9ac 0.7602537276873533 0.0
H3K27ac mean_wt 0.5827182905478256 0.0
H3K27ac mean_ko 0.5590745553867865 0.0
H3K27ac mean_ko-wt -0.42205738337847143 0.0
H3K36me3 H3K9me3 -0.08596619953337728 1.9975762016514672e-22
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K9ac 0.46303044184726333 0.0
H3K36me3 mean_wt 0.534749603678121 0.0
H3K36me3 mean_ko 0.5020241405110045 0.0
H3K36me3 mean_ko-wt -0.4851161257262746 0.0
H3K9ac H3K9me3 0.0006515620935032758 0.9412490950421215
H3K9ac H3K4me1 0.2614374133944155 5.329955864994627e-199
H3K9ac H3K4me2 0.46878793277456193 0.0
H3K9ac H3K4me3 0.8372246669947291 0.0
H3K9ac H3K27ac 0.7602537276873533 0.0
H3K9ac H3K36me3 0.46303044184726333 0.0
H3K9ac H3K9ac 1.0 0.0
H3K9ac mean_wt 0.5805856030139771 0.0
H3K9ac mean_ko 0.5592674641511871 0.0
H3K9ac mean_ko-wt -0.39977752635279323 0.0
mean_wt H3K9me3 -0.005812182301496532 0.5108995655637896
mean_wt H3K4me1 0.117474116423216 1.4678426946564922e-40
mean_wt H3K4me2 0.1839738440029166 8.235251256534976e-98
mean_wt H3K4me3 0.617202131514613 0.0
mean_wt H3K27ac 0.5827182905478255 0.0
mean_wt H3K36me3 0.534749603678121 0.0
mean_wt H3K9ac 0.5805856030139771 0.0
mean_wt mean_wt 1.0 0.0
mean_wt mean_ko 0.9918038831526816 0.0
mean_wt mean_ko-wt -0.4845025698158839 0.0
mean_ko H3K9me3 0.0012293357691734912 0.8894077672281322
mean_ko H3K4me1 0.11010738724216297 8.198213479177807e-36
mean_ko H3K4me2 0.17946752733713214 4.2877666356691384e-93
mean_ko H3K4me3 0.5881743020108969 0.0
mean_ko H3K27ac 0.5590745553867866 0.0
mean_ko H3K36me3 0.5020241405110045 0.0
mean_ko H3K9ac 0.5592674641511871 0.0
mean_ko mean_wt 0.9918038831526816 0.0
mean_ko mean_ko 1.0 0.0
mean_ko mean_ko-wt -0.3900643761493835 0.0
mean_ko-wt H3K9me3 0.07171376981069016 4.577998673738638e-16
mean_ko-wt H3K4me1 -0.12351444023102398 1.0993490972728222e-44
mean_ko-wt H3K4me2 -0.09888737471837038 3.5238851765166497e-29
mean_ko-wt H3K4me3 -0.48552252459057177 0.0
mean_ko-wt H3K27ac -0.42205738337847143 0.0
mean_ko-wt H3K36me3 -0.48511612572627455 0.0
mean_ko-wt H3K9ac -0.39977752635279323 0.0
mean_ko-wt mean_wt -0.4845025698158839 0.0
mean_ko-wt mean_ko -0.3900643761493835 0.0
mean_ko-wt mean_ko-wt 1.0 0.0
<Figure size 216x216 with 0 Axes>
H3K9me3 H3K9me3 1.0 0.0
H3K9me3 H3K4me1 -0.14322560612182772 1.2682004430470273e-59
H3K9me3 H3K4me2 -0.012727232249096996 0.14996053879600038
H3K9me3 H3K4me3 -0.031174294277473532 0.0004201886170928389
H3K9me3 H3K27ac -0.00358288782217438 0.6852778158564187
H3K9me3 H3K36me3 -0.08596619953337728 1.9975762016514672e-22
H3K9me3 H3K9ac 0.0006515620935032757 0.9412490950421215
H3K9me3 mean_wt -0.005812182301496531 0.5108995655637896
H3K9me3 mean_ko 0.0012293357691734912 0.8894077672281322
H3K9me3 mean_ko-wt 0.07171376981069018 4.577998673738538e-16
H3K9me3 H3K4me1 -0.14322560612182772 1.2682004430470273e-59
H3K9me3 H3K4me2 -0.012727232249096996 0.14996053879600038
H3K9me3 H3K4me3 -0.031174294277473532 0.0004201886170928389
H3K9me3 H3K27ac -0.00358288782217438 0.6852778158564187
H3K9me3 H3K36me3 -0.08596619953337728 1.9975762016514672e-22
H3K9me3 H3K27me3 0.06719198878685362 2.764988245960282e-14
H3K9me3 Log2FC FB 0.09824918653348803 7.994118616749208e-29
H3K9me3 Log2FC MB 0.019587856642572236 0.02670181757210075
H3K9me3 Log2FC HB -0.008660581682350359 0.32726345641777266
H3K9me3 Log2FC SC 0.025615504235275782 0.0037565089010411284
H3K9me3 VAE0 0.08868709764477078 9.052169614398737e-24
H3K9me3 VAE1 -0.08196466377555486 1.58878405718112e-20
H3K9me3 VAE2 0.07867195641802001 4.984097779369867e-19
H3K4me1 H3K9me3 -0.14322560612182772 1.2682004430470273e-59
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K9ac 0.2614374133944155 5.329955864994627e-199
H3K4me1 mean_wt 0.11747411642321601 1.4678426946564922e-40
H3K4me1 mean_ko 0.11010738724216297 8.198213479177807e-36
H3K4me1 mean_ko-wt -0.12351444023102397 1.0993490972728222e-44
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K27me3 0.03880145459733418 1.1304167715365197e-05
H3K4me1 Log2FC FB -0.14880590787152698 2.8859404622978633e-64
H3K4me1 Log2FC MB -0.10387373575786396 4.872008964191265e-32
H3K4me1 Log2FC HB -0.05777615219411477 6.12378414825415e-11
H3K4me1 Log2FC SC -0.07950151137451965 2.1197279496874784e-19
H3K4me1 VAE0 -0.013568556295341615 0.12482123994503176
H3K4me1 VAE1 -0.031975417695767415 0.00029717150125224174
H3K4me1 VAE2 -0.07362293623376154 7.491335391145723e-17
H3K4me2 H3K9me3 -0.012727232249096996 0.14996053879600038
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K9ac 0.468787932774562 0.0
H3K4me2 mean_wt 0.18397384400291664 8.235251256534976e-98
H3K4me2 mean_ko 0.17946752733713214 4.2877666356691384e-93
H3K4me2 mean_ko-wt -0.09888737471837038 3.5238851765166497e-29
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K27me3 0.1836859102996935 1.6625204625607636e-97
H3K4me2 Log2FC FB -0.12969526458358954 3.9896551047753745e-49
H3K4me2 Log2FC MB -0.09642120978180409 8.108800676805556e-28
H3K4me2 Log2FC HB -0.10550208768149451 5.2879602412044856e-33
H3K4me2 Log2FC SC -0.08178812465927765 1.9179743858493656e-20
H3K4me2 VAE0 0.18887754682460806 4.3799637480023355e-103
H3K4me2 VAE1 -0.1924047620744796 5.701135438644e-107
H3K4me2 VAE2 -0.09528118666911108 3.36413886621527e-27
H3K4me3 H3K9me3 -0.031174294277473535 0.0004201886170928379
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K9ac 0.8372246669947291 0.0
H3K4me3 mean_wt 0.6172021315146129 0.0
H3K4me3 mean_ko 0.588174302010897 0.0
H3K4me3 mean_ko-wt -0.48552252459057177 0.0
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K27me3 -0.28958561139696254 1.0906807671975684e-245
H3K4me3 Log2FC FB -0.4470506488127457 0.0
H3K4me3 Log2FC MB -0.4473702882601094 0.0
H3K4me3 Log2FC HB -0.41979679249095553 0.0
H3K4me3 Log2FC SC -0.3297606127199917 0.0
H3K4me3 VAE0 -0.06585650111025297 8.830832983169405e-14
H3K4me3 VAE1 0.18648158069639809 1.7257177250362483e-100
H3K4me3 VAE2 -0.45745926370705253 0.0
H3K27ac H3K9me3 -0.00358288782217438 0.6852778158564187
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K9ac 0.7602537276873533 0.0
H3K27ac mean_wt 0.5827182905478256 0.0
H3K27ac mean_ko 0.5590745553867865 0.0
H3K27ac mean_ko-wt -0.42205738337847143 0.0
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K27me3 -0.2526689336918533 1.4216280599037781e-185
H3K27ac Log2FC FB -0.3815669720025924 0.0
H3K27ac Log2FC MB -0.42208837018425827 0.0
H3K27ac Log2FC HB -0.408298389874337 0.0
H3K27ac Log2FC SC -0.2977765740809075 2.491982785246384e-260
H3K27ac VAE0 -0.021472303565038334 0.01513753080634104
H3K27ac VAE1 0.16479213573088783 1.3658104535434414e-78
H3K27ac VAE2 -0.41816622635705336 0.0
H3K36me3 H3K9me3 -0.08596619953337728 1.9975762016514672e-22
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K9ac 0.46303044184726333 0.0
H3K36me3 mean_wt 0.534749603678121 0.0
H3K36me3 mean_ko 0.5020241405110045 0.0
H3K36me3 mean_ko-wt -0.4851161257262746 0.0
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K27me3 -0.35415360112947697 0.0
H3K36me3 Log2FC FB -0.4744138412763159 0.0
H3K36me3 Log2FC MB -0.430059873023584 0.0
H3K36me3 Log2FC HB -0.3634108408611482 0.0
H3K36me3 Log2FC SC -0.33209079328572233 0.0
H3K36me3 VAE0 -0.14637831865282763 3.1818613224446687e-62
H3K36me3 VAE1 0.2773544371972295 1.0166011378724836e-224
H3K36me3 VAE2 -0.44625458684523317 0.0
H3K9ac H3K9me3 0.0006515620935032758 0.9412490950421215
H3K9ac H3K4me1 0.2614374133944155 5.329955864994627e-199
H3K9ac H3K4me2 0.46878793277456193 0.0
H3K9ac H3K4me3 0.8372246669947291 0.0
H3K9ac H3K27ac 0.7602537276873533 0.0
H3K9ac H3K36me3 0.46303044184726333 0.0
H3K9ac H3K9ac 1.0 0.0
H3K9ac mean_wt 0.5805856030139771 0.0
H3K9ac mean_ko 0.5592674641511871 0.0
H3K9ac mean_ko-wt -0.39977752635279323 0.0
H3K9ac H3K4me1 0.2614374133944155 5.329955864994627e-199
H3K9ac H3K4me2 0.46878793277456193 0.0
H3K9ac H3K4me3 0.8372246669947291 0.0
H3K9ac H3K27ac 0.7602537276873533 0.0
H3K9ac H3K36me3 0.46303044184726333 0.0
H3K9ac H3K27me3 -0.2049746737349427 1.9027988176860502e-121
H3K9ac Log2FC FB -0.3676902675182298 0.0
H3K9ac Log2FC MB -0.39013572214451403 0.0
H3K9ac Log2FC HB -0.3936885591832504 0.0
H3K9ac Log2FC SC -0.26251104559696414 1.1139140119303159e-200
H3K9ac VAE0 0.03285021641590677 0.0002017762346797588
H3K9ac VAE1 0.11449876932898181 1.3228165517572424e-38
H3K9ac VAE2 -0.3957199151340929 0.0
mean_wt H3K9me3 -0.005812182301496532 0.5108995655637896
mean_wt H3K4me1 0.117474116423216 1.4678426946564922e-40
mean_wt H3K4me2 0.1839738440029166 8.235251256534976e-98
mean_wt H3K4me3 0.617202131514613 0.0
mean_wt H3K27ac 0.5827182905478255 0.0
mean_wt H3K36me3 0.534749603678121 0.0
mean_wt H3K9ac 0.5805856030139771 0.0
mean_wt mean_wt 1.0 0.0
mean_wt mean_ko 0.9918038831526816 0.0
mean_wt mean_ko-wt -0.4845025698158839 0.0
mean_wt H3K4me1 0.117474116423216 1.4678426946564922e-40
mean_wt H3K4me2 0.1839738440029166 8.235251256534976e-98
mean_wt H3K4me3 0.617202131514613 0.0
mean_wt H3K27ac 0.5827182905478255 0.0
mean_wt H3K36me3 0.534749603678121 0.0
mean_wt H3K27me3 -0.25633608266022023 3.991995123962663e-191
mean_wt Log2FC FB -0.4478380069404565 0.0
mean_wt Log2FC MB -0.4838366012597243 0.0
mean_wt Log2FC HB -0.506836755731281 0.0
mean_wt Log2FC SC -0.32938626839064894 0.0
mean_wt VAE0 -0.0002166111555400701 0.9804525957654797
mean_wt VAE1 0.03729130482907743 2.4474637045818884e-05
mean_wt VAE2 -0.5441905202636792 0.0
mean_ko H3K9me3 0.0012293357691734912 0.8894077672281322
mean_ko H3K4me1 0.11010738724216297 8.198213479177807e-36
mean_ko H3K4me2 0.17946752733713214 4.2877666356691384e-93
mean_ko H3K4me3 0.5881743020108969 0.0
mean_ko H3K27ac 0.5590745553867866 0.0
mean_ko H3K36me3 0.5020241405110045 0.0
mean_ko H3K9ac 0.5592674641511871 0.0
mean_ko mean_wt 0.9918038831526816 0.0
mean_ko mean_ko 1.0 0.0
mean_ko mean_ko-wt -0.3900643761493835 0.0
mean_ko H3K4me1 0.11010738724216297 8.198213479177807e-36
mean_ko H3K4me2 0.17946752733713214 4.2877666356691384e-93
mean_ko H3K4me3 0.5881743020108969 0.0
mean_ko H3K27ac 0.5590745553867866 0.0
mean_ko H3K36me3 0.5020241405110045 0.0
mean_ko H3K27me3 -0.21440371983804937 5.856222186263505e-133
mean_ko Log2FC FB -0.3652333864195841 0.0
mean_ko Log2FC MB -0.403537786657164 0.0
mean_ko Log2FC HB -0.44133074189202925 0.0
mean_ko Log2FC SC -0.263675332447768 1.645195278633999e-202
mean_ko VAE0 0.018585159776955285 0.035518200971411784
mean_ko VAE1 -0.024162814115739038 0.0062660931797977265
mean_ko VAE2 -0.5085969664258713 0.0
mean_ko-wt H3K9me3 0.07171376981069016 4.577998673738638e-16
mean_ko-wt H3K4me1 -0.12351444023102398 1.0993490972728222e-44
mean_ko-wt H3K4me2 -0.09888737471837038 3.5238851765166497e-29
mean_ko-wt H3K4me3 -0.48552252459057177 0.0
mean_ko-wt H3K27ac -0.42205738337847143 0.0
mean_ko-wt H3K36me3 -0.48511612572627455 0.0
mean_ko-wt H3K9ac -0.39977752635279323 0.0
mean_ko-wt mean_wt -0.4845025698158839 0.0
mean_ko-wt mean_ko -0.3900643761493835 0.0
mean_ko-wt mean_ko-wt 1.0 0.0
mean_ko-wt H3K4me1 -0.12351444023102398 1.0993490972728222e-44
mean_ko-wt H3K4me2 -0.09888737471837038 3.5238851765166497e-29
mean_ko-wt H3K4me3 -0.48552252459057177 0.0
mean_ko-wt H3K27ac -0.42205738337847143 0.0
mean_ko-wt H3K36me3 -0.48511612572627455 0.0
mean_ko-wt H3K27me3 0.4103386737863612 0.0
mean_ko-wt Log2FC FB 0.8805965114989298 0.0
mean_ko-wt Log2FC MB 0.8704536519772174 0.0
mean_ko-wt Log2FC HB 0.7455835313610006 0.0
mean_ko-wt Log2FC SC 0.6978367483354114 0.0
mean_ko-wt VAE0 0.18287579221918518 1.1924095439790589e-96
mean_ko-wt VAE1 -0.4787380546344486 0.0
mean_ko-wt VAE2 0.5164362537253868 0.0
H3K4me1 H3K9me3 -0.14322560612182772 1.2682004430470273e-59
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K9ac 0.2614374133944155 5.329955864994627e-199
H3K4me1 mean_wt 0.11747411642321601 1.4678426946564922e-40
H3K4me1 mean_ko 0.11010738724216297 8.198213479177807e-36
H3K4me1 mean_ko-wt -0.12351444023102397 1.0993490972728222e-44
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K27me3 0.03880145459733418 1.1304167715365197e-05
H3K4me1 Log2FC FB -0.14880590787152698 2.8859404622978633e-64
H3K4me1 Log2FC MB -0.10387373575786396 4.872008964191265e-32
H3K4me1 Log2FC HB -0.05777615219411477 6.12378414825415e-11
H3K4me1 Log2FC SC -0.07950151137451965 2.1197279496874784e-19
H3K4me1 VAE0 -0.013568556295341615 0.12482123994503176
H3K4me1 VAE1 -0.031975417695767415 0.00029717150125224174
H3K4me1 VAE2 -0.07362293623376154 7.491335391145723e-17
H3K4me2 H3K9me3 -0.012727232249096996 0.14996053879600038
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K9ac 0.468787932774562 0.0
H3K4me2 mean_wt 0.18397384400291664 8.235251256534976e-98
H3K4me2 mean_ko 0.17946752733713214 4.2877666356691384e-93
H3K4me2 mean_ko-wt -0.09888737471837038 3.5238851765166497e-29
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K27me3 0.1836859102996935 1.6625204625607636e-97
H3K4me2 Log2FC FB -0.12969526458358954 3.9896551047753745e-49
H3K4me2 Log2FC MB -0.09642120978180409 8.108800676805556e-28
H3K4me2 Log2FC HB -0.10550208768149451 5.2879602412044856e-33
H3K4me2 Log2FC SC -0.08178812465927765 1.9179743858493656e-20
H3K4me2 VAE0 0.18887754682460806 4.3799637480023355e-103
H3K4me2 VAE1 -0.1924047620744796 5.701135438644e-107
H3K4me2 VAE2 -0.09528118666911108 3.36413886621527e-27
H3K4me3 H3K9me3 -0.031174294277473535 0.0004201886170928379
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K9ac 0.8372246669947291 0.0
H3K4me3 mean_wt 0.6172021315146129 0.0
H3K4me3 mean_ko 0.588174302010897 0.0
H3K4me3 mean_ko-wt -0.48552252459057177 0.0
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K27me3 -0.28958561139696254 1.0906807671975684e-245
H3K4me3 Log2FC FB -0.4470506488127457 0.0
H3K4me3 Log2FC MB -0.4473702882601094 0.0
H3K4me3 Log2FC HB -0.41979679249095553 0.0
H3K4me3 Log2FC SC -0.3297606127199917 0.0
H3K4me3 VAE0 -0.06585650111025297 8.830832983169405e-14
H3K4me3 VAE1 0.18648158069639809 1.7257177250362483e-100
H3K4me3 VAE2 -0.45745926370705253 0.0
H3K27ac H3K9me3 -0.00358288782217438 0.6852778158564187
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K9ac 0.7602537276873533 0.0
H3K27ac mean_wt 0.5827182905478256 0.0
H3K27ac mean_ko 0.5590745553867865 0.0
H3K27ac mean_ko-wt -0.42205738337847143 0.0
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K27me3 -0.2526689336918533 1.4216280599037781e-185
H3K27ac Log2FC FB -0.3815669720025924 0.0
H3K27ac Log2FC MB -0.42208837018425827 0.0
H3K27ac Log2FC HB -0.408298389874337 0.0
H3K27ac Log2FC SC -0.2977765740809075 2.491982785246384e-260
H3K27ac VAE0 -0.021472303565038334 0.01513753080634104
H3K27ac VAE1 0.16479213573088783 1.3658104535434414e-78
H3K27ac VAE2 -0.41816622635705336 0.0
H3K36me3 H3K9me3 -0.08596619953337728 1.9975762016514672e-22
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K9ac 0.46303044184726333 0.0
H3K36me3 mean_wt 0.534749603678121 0.0
H3K36me3 mean_ko 0.5020241405110045 0.0
H3K36me3 mean_ko-wt -0.4851161257262746 0.0
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K27me3 -0.35415360112947697 0.0
H3K36me3 Log2FC FB -0.4744138412763159 0.0
H3K36me3 Log2FC MB -0.430059873023584 0.0
H3K36me3 Log2FC HB -0.3634108408611482 0.0
H3K36me3 Log2FC SC -0.33209079328572233 0.0
H3K36me3 VAE0 -0.14637831865282763 3.1818613224446687e-62
H3K36me3 VAE1 0.2773544371972295 1.0166011378724836e-224
H3K36me3 VAE2 -0.44625458684523317 0.0
H3K27me3 H3K9me3 0.06719198878685362 2.764988245960282e-14
H3K27me3 H3K4me1 0.03880145459733418 1.1304167715365197e-05
H3K27me3 H3K4me2 0.18368591029969353 1.662520462560716e-97
H3K27me3 H3K4me3 -0.2895856113969625 1.0906807671978166e-245
H3K27me3 H3K27ac -0.2526689336918533 1.4216280599037781e-185
H3K27me3 H3K36me3 -0.35415360112947697 0.0
H3K27me3 H3K9ac -0.2049746737349427 1.9027988176860502e-121
H3K27me3 mean_wt -0.25633608266022023 3.991995123962663e-191
H3K27me3 mean_ko -0.21440371983804937 5.856222186263505e-133
H3K27me3 mean_ko-wt 0.4103386737863612 0.0
H3K27me3 H3K4me1 0.03880145459733418 1.1304167715365197e-05
H3K27me3 H3K4me2 0.18368591029969353 1.662520462560716e-97
H3K27me3 H3K4me3 -0.2895856113969625 1.0906807671978166e-245
H3K27me3 H3K27ac -0.2526689336918533 1.4216280599037781e-185
H3K27me3 H3K36me3 -0.35415360112947697 0.0
H3K27me3 H3K27me3 1.0 0.0
H3K27me3 Log2FC FB 0.37643342244583206 0.0
H3K27me3 Log2FC MB 0.3225460106810916 1.314030964712288e-307
H3K27me3 Log2FC HB 0.2347875537574898 8.590917791342444e-160
H3K27me3 Log2FC SC 0.2956826706138225 1.5329233866307224e-256
H3K27me3 VAE0 0.5530783713203921 0.0
H3K27me3 VAE1 -0.8554111444358766 0.0
H3K27me3 VAE2 0.3788059166332001 0.0
Log2FC FB H3K9me3 0.09824918653348805 7.994118616748979e-29
Log2FC FB H3K4me1 -0.14880590787152698 2.8859404622978633e-64
Log2FC FB H3K4me2 -0.12969526458358954 3.9896551047753745e-49
Log2FC FB H3K4me3 -0.4470506488127457 0.0
Log2FC FB H3K27ac -0.3815669720025924 0.0
Log2FC FB H3K36me3 -0.4744138412763159 0.0
Log2FC FB H3K9ac -0.36769026751822986 0.0
Log2FC FB mean_wt -0.4478380069404565 0.0
Log2FC FB mean_ko -0.3652333864195841 0.0
Log2FC FB mean_ko-wt 0.8805965114989297 0.0
Log2FC FB H3K4me1 -0.14880590787152698 2.8859404622978633e-64
Log2FC FB H3K4me2 -0.12969526458358954 3.9896551047753745e-49
Log2FC FB H3K4me3 -0.4470506488127457 0.0
Log2FC FB H3K27ac -0.3815669720025924 0.0
Log2FC FB H3K36me3 -0.4744138412763159 0.0
Log2FC FB H3K27me3 0.37643342244583206 0.0
Log2FC FB Log2FC FB 1.0 0.0
Log2FC FB Log2FC MB 0.7040491449224625 0.0
Log2FC FB Log2FC HB 0.5367783316680511 0.0
Log2FC FB Log2FC SC 0.5730464144717174 0.0
Log2FC FB VAE0 0.23386004862667242 1.6353603410522057e-158
Log2FC FB VAE1 -0.42031788136966924 0.0
Log2FC FB VAE2 0.5571965727331442 0.0
Log2FC MB H3K9me3 0.019587856642572236 0.02670181757210075
Log2FC MB H3K4me1 -0.10387373575786396 4.872008964191265e-32
Log2FC MB H3K4me2 -0.09642120978180409 8.108800676805556e-28
Log2FC MB H3K4me3 -0.44737028826010944 0.0
Log2FC MB H3K27ac -0.4220883701842583 0.0
Log2FC MB H3K36me3 -0.43005987302358406 0.0
Log2FC MB H3K9ac -0.3901357221445141 0.0
Log2FC MB mean_wt -0.4838366012597243 0.0
Log2FC MB mean_ko -0.40353778665716405 0.0
Log2FC MB mean_ko-wt 0.8704536519772174 0.0
Log2FC MB H3K4me1 -0.10387373575786396 4.872008964191265e-32
Log2FC MB H3K4me2 -0.09642120978180409 8.108800676805556e-28
Log2FC MB H3K4me3 -0.44737028826010944 0.0
Log2FC MB H3K27ac -0.4220883701842583 0.0
Log2FC MB H3K36me3 -0.43005987302358406 0.0
Log2FC MB H3K27me3 0.32254601068109157 1.314030964712587e-307
Log2FC MB Log2FC FB 0.7040491449224625 0.0
Log2FC MB Log2FC MB 0.9999999999999999 0.0
Log2FC MB Log2FC HB 0.7578212671301587 0.0
Log2FC MB Log2FC SC 0.5751592030701783 0.0
Log2FC MB VAE0 0.09497872033347349 4.893067037273455e-27
Log2FC MB VAE1 -0.38359407529821415 0.0
Log2FC MB VAE2 0.4076827285688065 0.0
Log2FC HB H3K9me3 -0.008660581682350359 0.32726345641777266
Log2FC HB H3K4me1 -0.05777615219411477 6.12378414825415e-11
Log2FC HB H3K4me2 -0.10550208768149451 5.2879602412044856e-33
Log2FC HB H3K4me3 -0.4197967924909555 0.0
Log2FC HB H3K27ac -0.408298389874337 0.0
Log2FC HB H3K36me3 -0.36341084086114817 0.0
Log2FC HB H3K9ac -0.3936885591832504 0.0
Log2FC HB mean_wt -0.506836755731281 0.0
Log2FC HB mean_ko -0.4413307418920293 0.0
Log2FC HB mean_ko-wt 0.7455835313610005 0.0
Log2FC HB H3K4me1 -0.05777615219411477 6.12378414825415e-11
Log2FC HB H3K4me2 -0.10550208768149451 5.2879602412044856e-33
Log2FC HB H3K4me3 -0.4197967924909555 0.0
Log2FC HB H3K27ac -0.408298389874337 0.0
Log2FC HB H3K36me3 -0.36341084086114817 0.0
Log2FC HB H3K27me3 0.2347875537574898 8.590917791342444e-160
Log2FC HB Log2FC FB 0.5367783316680511 0.0
Log2FC HB Log2FC MB 0.7578212671301588 0.0
Log2FC HB Log2FC HB 1.0 0.0
Log2FC HB Log2FC SC 0.47172347343211496 0.0
Log2FC HB VAE0 -0.060557993887538075 7.072852121470975e-12
Log2FC HB VAE1 -0.2517816330407703 3.0367592025972104e-184
Log2FC HB VAE2 0.23197909457281732 6.183849194431829e-156
Log2FC SC H3K9me3 0.02561550423527578 0.0037565089010411353
Log2FC SC H3K4me1 -0.07950151137451963 2.1197279496875092e-19
Log2FC SC H3K4me2 -0.08178812465927764 1.9179743858494207e-20
Log2FC SC H3K4me3 -0.3297606127199917 0.0
Log2FC SC H3K27ac -0.2977765740809076 2.4919827852461e-260
Log2FC SC H3K36me3 -0.33209079328572233 0.0
Log2FC SC H3K9ac -0.26251104559696414 1.1139140119303159e-200
Log2FC SC mean_wt -0.3293862683906489 0.0
Log2FC SC mean_ko -0.263675332447768 1.645195278633999e-202
Log2FC SC mean_ko-wt 0.6978367483354115 0.0
Log2FC SC H3K4me1 -0.07950151137451963 2.1197279496875092e-19
Log2FC SC H3K4me2 -0.08178812465927764 1.9179743858494207e-20
Log2FC SC H3K4me3 -0.3297606127199917 0.0
Log2FC SC H3K27ac -0.2977765740809076 2.4919827852461e-260
Log2FC SC H3K36me3 -0.33209079328572233 0.0
Log2FC SC H3K27me3 0.2956826706138225 1.5329233866307224e-256
Log2FC SC Log2FC FB 0.5730464144717174 0.0
Log2FC SC Log2FC MB 0.5751592030701783 0.0
Log2FC SC Log2FC HB 0.47172347343211496 0.0
Log2FC SC Log2FC SC 0.9999999999999999 0.0
Log2FC SC VAE0 0.06903724913680313 5.353138003220564e-15
Log2FC SC VAE1 -0.35928593051293045 0.0
Log2FC SC VAE2 0.4474914576959328 0.0
VAE0 H3K9me3 0.08868709764477078 9.052169614398737e-24
VAE0 H3K4me1 -0.013568556295341615 0.12482123994503176
VAE0 H3K4me2 0.18887754682460808 4.3799637480020857e-103
VAE0 H3K4me3 -0.06585650111025299 8.830832983169246e-14
VAE0 H3K27ac -0.021472303565038334 0.01513753080634104
VAE0 H3K36me3 -0.14637831865282763 3.1818613224446687e-62
VAE0 H3K9ac 0.03285021641590677 0.0002017762346797588
VAE0 mean_wt -0.00021661115554007013 0.9804525957654797
VAE0 mean_ko 0.018585159776955285 0.035518200971411784
VAE0 mean_ko-wt 0.1828757922191852 1.1924095439788549e-96
VAE0 H3K4me1 -0.013568556295341615 0.12482123994503176
VAE0 H3K4me2 0.18887754682460808 4.3799637480020857e-103
VAE0 H3K4me3 -0.06585650111025299 8.830832983169246e-14
VAE0 H3K27ac -0.021472303565038334 0.01513753080634104
VAE0 H3K36me3 -0.14637831865282763 3.1818613224446687e-62
VAE0 H3K27me3 0.5530783713203921 0.0
VAE0 Log2FC FB 0.23386004862667245 1.6353603410522057e-158
VAE0 Log2FC MB 0.09497872033347349 4.893067037273455e-27
VAE0 Log2FC HB -0.06055799388753807 7.072852121471026e-12
VAE0 Log2FC SC 0.06903724913680313 5.353138003220564e-15
VAE0 VAE0 1.0 0.0
VAE0 VAE1 -0.46110326962849063 0.0
VAE0 VAE2 0.0553254384134554 3.7809955029025667e-10
VAE1 H3K9me3 -0.08196466377555486 1.58878405718112e-20
VAE1 H3K4me1 -0.031975417695767415 0.00029717150125224174
VAE1 H3K4me2 -0.19240476207447962 5.701135438643352e-107
VAE1 H3K4me3 0.18648158069639809 1.7257177250362483e-100
VAE1 H3K27ac 0.16479213573088783 1.3658104535434414e-78
VAE1 H3K36me3 0.2773544371972296 1.0166011378721364e-224
VAE1 H3K9ac 0.11449876932898181 1.3228165517572424e-38
VAE1 mean_wt 0.03729130482907743 2.4474637045818884e-05
VAE1 mean_ko -0.02416281411573904 0.006266093179797714
VAE1 mean_ko-wt -0.4787380546344486 0.0
VAE1 H3K4me1 -0.031975417695767415 0.00029717150125224174
VAE1 H3K4me2 -0.19240476207447962 5.701135438643352e-107
VAE1 H3K4me3 0.18648158069639809 1.7257177250362483e-100
VAE1 H3K27ac 0.16479213573088783 1.3658104535434414e-78
VAE1 H3K36me3 0.2773544371972296 1.0166011378721364e-224
VAE1 H3K27me3 -0.8554111444358766 0.0
VAE1 Log2FC FB -0.42031788136966924 0.0
VAE1 Log2FC MB -0.3835940752982142 0.0
VAE1 Log2FC HB -0.25178163304077034 3.0367592025966925e-184
VAE1 Log2FC SC -0.35928593051293045 0.0
VAE1 VAE0 -0.46110326962849063 0.0
VAE1 VAE1 1.0 0.0
VAE1 VAE2 -0.3076063848742393 1.5155595210118842e-278
VAE2 H3K9me3 0.07867195641802002 4.984097779369759e-19
VAE2 H3K4me1 -0.07362293623376154 7.491335391145723e-17
VAE2 H3K4me2 -0.09528118666911108 3.36413886621527e-27
VAE2 H3K4me3 -0.4574592637070526 0.0
VAE2 H3K27ac -0.4181662263570533 0.0
VAE2 H3K36me3 -0.44625458684523317 0.0
VAE2 H3K9ac -0.3957199151340928 0.0
VAE2 mean_wt -0.5441905202636792 0.0
VAE2 mean_ko -0.5085969664258713 0.0
VAE2 mean_ko-wt 0.5164362537253868 0.0
VAE2 H3K4me1 -0.07362293623376154 7.491335391145723e-17
VAE2 H3K4me2 -0.09528118666911108 3.36413886621527e-27
VAE2 H3K4me3 -0.4574592637070526 0.0
VAE2 H3K27ac -0.4181662263570533 0.0
VAE2 H3K36me3 -0.44625458684523317 0.0
VAE2 H3K27me3 0.3788059166332001 0.0
VAE2 Log2FC FB 0.5571965727331442 0.0
VAE2 Log2FC MB 0.40768272856880644 0.0
VAE2 Log2FC HB 0.23197909457281732 6.183849194431829e-156
VAE2 Log2FC SC 0.44749145769593274 0.0
VAE2 VAE0 0.0553254384134554 3.7809955029025667e-10
VAE2 VAE1 -0.3076063848742393 1.5155595210118842e-278
VAE2 VAE2 1.0 0.0
<Figure size 216x216 with 0 Axes>
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K27me3 0.03880145459733418 1.1304167715365197e-05
H3K4me1 Log2FC FB -0.14880590787152698 2.8859404622978633e-64
H3K4me1 Log2FC MB -0.10387373575786396 4.872008964191265e-32
H3K4me1 Log2FC HB -0.05777615219411477 6.12378414825415e-11
H3K4me1 Log2FC SC -0.07950151137451965 2.1197279496874784e-19
H3K4me1 VAE0 -0.013568556295341615 0.12482123994503176
H3K4me1 VAE1 -0.031975417695767415 0.00029717150125224174
H3K4me1 VAE2 -0.07362293623376154 7.491335391145723e-17
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K27me3 0.1836859102996935 1.6625204625607636e-97
H3K4me2 Log2FC FB -0.12969526458358954 3.9896551047753745e-49
H3K4me2 Log2FC MB -0.09642120978180409 8.108800676805556e-28
H3K4me2 Log2FC HB -0.10550208768149451 5.2879602412044856e-33
H3K4me2 Log2FC SC -0.08178812465927765 1.9179743858493656e-20
H3K4me2 VAE0 0.18887754682460806 4.3799637480023355e-103
H3K4me2 VAE1 -0.1924047620744796 5.701135438644e-107
H3K4me2 VAE2 -0.09528118666911108 3.36413886621527e-27
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K27me3 -0.28958561139696254 1.0906807671975684e-245
H3K4me3 Log2FC FB -0.4470506488127457 0.0
H3K4me3 Log2FC MB -0.4473702882601094 0.0
H3K4me3 Log2FC HB -0.41979679249095553 0.0
H3K4me3 Log2FC SC -0.3297606127199917 0.0
H3K4me3 VAE0 -0.06585650111025297 8.830832983169405e-14
H3K4me3 VAE1 0.18648158069639809 1.7257177250362483e-100
H3K4me3 VAE2 -0.45745926370705253 0.0
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K27me3 -0.2526689336918533 1.4216280599037781e-185
H3K27ac Log2FC FB -0.3815669720025924 0.0
H3K27ac Log2FC MB -0.42208837018425827 0.0
H3K27ac Log2FC HB -0.408298389874337 0.0
H3K27ac Log2FC SC -0.2977765740809075 2.491982785246384e-260
H3K27ac VAE0 -0.021472303565038334 0.01513753080634104
H3K27ac VAE1 0.16479213573088783 1.3658104535434414e-78
H3K27ac VAE2 -0.41816622635705336 0.0
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K27me3 -0.35415360112947697 0.0
H3K36me3 Log2FC FB -0.4744138412763159 0.0
H3K36me3 Log2FC MB -0.430059873023584 0.0
H3K36me3 Log2FC HB -0.3634108408611482 0.0
H3K36me3 Log2FC SC -0.33209079328572233 0.0
H3K36me3 VAE0 -0.14637831865282763 3.1818613224446687e-62
H3K36me3 VAE1 0.2773544371972295 1.0166011378724836e-224
H3K36me3 VAE2 -0.44625458684523317 0.0
H3K27me3 H3K4me1 0.03880145459733418 1.1304167715365197e-05
H3K27me3 H3K4me2 0.18368591029969353 1.662520462560716e-97
H3K27me3 H3K4me3 -0.2895856113969625 1.0906807671978166e-245
H3K27me3 H3K27ac -0.2526689336918533 1.4216280599037781e-185
H3K27me3 H3K36me3 -0.35415360112947697 0.0
H3K27me3 H3K27me3 1.0 0.0
H3K27me3 Log2FC FB 0.37643342244583206 0.0
H3K27me3 Log2FC MB 0.3225460106810916 1.314030964712288e-307
H3K27me3 Log2FC HB 0.2347875537574898 8.590917791342444e-160
H3K27me3 Log2FC SC 0.2956826706138225 1.5329233866307224e-256
H3K27me3 VAE0 0.5530783713203921 0.0
H3K27me3 VAE1 -0.8554111444358766 0.0
H3K27me3 VAE2 0.3788059166332001 0.0
Log2FC FB H3K4me1 -0.14880590787152698 2.8859404622978633e-64
Log2FC FB H3K4me2 -0.12969526458358954 3.9896551047753745e-49
Log2FC FB H3K4me3 -0.4470506488127457 0.0
Log2FC FB H3K27ac -0.3815669720025924 0.0
Log2FC FB H3K36me3 -0.4744138412763159 0.0
Log2FC FB H3K27me3 0.37643342244583206 0.0
Log2FC FB Log2FC FB 1.0 0.0
Log2FC FB Log2FC MB 0.7040491449224625 0.0
Log2FC FB Log2FC HB 0.5367783316680511 0.0
Log2FC FB Log2FC SC 0.5730464144717174 0.0
Log2FC FB VAE0 0.23386004862667242 1.6353603410522057e-158
Log2FC FB VAE1 -0.42031788136966924 0.0
Log2FC FB VAE2 0.5571965727331442 0.0
Log2FC MB H3K4me1 -0.10387373575786396 4.872008964191265e-32
Log2FC MB H3K4me2 -0.09642120978180409 8.108800676805556e-28
Log2FC MB H3K4me3 -0.44737028826010944 0.0
Log2FC MB H3K27ac -0.4220883701842583 0.0
Log2FC MB H3K36me3 -0.43005987302358406 0.0
Log2FC MB H3K27me3 0.32254601068109157 1.314030964712587e-307
Log2FC MB Log2FC FB 0.7040491449224625 0.0
Log2FC MB Log2FC MB 0.9999999999999999 0.0
Log2FC MB Log2FC HB 0.7578212671301587 0.0
Log2FC MB Log2FC SC 0.5751592030701783 0.0
Log2FC MB VAE0 0.09497872033347349 4.893067037273455e-27
Log2FC MB VAE1 -0.38359407529821415 0.0
Log2FC MB VAE2 0.4076827285688065 0.0
Log2FC HB H3K4me1 -0.05777615219411477 6.12378414825415e-11
Log2FC HB H3K4me2 -0.10550208768149451 5.2879602412044856e-33
Log2FC HB H3K4me3 -0.4197967924909555 0.0
Log2FC HB H3K27ac -0.408298389874337 0.0
Log2FC HB H3K36me3 -0.36341084086114817 0.0
Log2FC HB H3K27me3 0.2347875537574898 8.590917791342444e-160
Log2FC HB Log2FC FB 0.5367783316680511 0.0
Log2FC HB Log2FC MB 0.7578212671301588 0.0
Log2FC HB Log2FC HB 1.0 0.0
Log2FC HB Log2FC SC 0.47172347343211496 0.0
Log2FC HB VAE0 -0.060557993887538075 7.072852121470975e-12
Log2FC HB VAE1 -0.2517816330407703 3.0367592025972104e-184
Log2FC HB VAE2 0.23197909457281732 6.183849194431829e-156
Log2FC SC H3K4me1 -0.07950151137451963 2.1197279496875092e-19
Log2FC SC H3K4me2 -0.08178812465927764 1.9179743858494207e-20
Log2FC SC H3K4me3 -0.3297606127199917 0.0
Log2FC SC H3K27ac -0.2977765740809076 2.4919827852461e-260
Log2FC SC H3K36me3 -0.33209079328572233 0.0
Log2FC SC H3K27me3 0.2956826706138225 1.5329233866307224e-256
Log2FC SC Log2FC FB 0.5730464144717174 0.0
Log2FC SC Log2FC MB 0.5751592030701783 0.0
Log2FC SC Log2FC HB 0.47172347343211496 0.0
Log2FC SC Log2FC SC 0.9999999999999999 0.0
Log2FC SC VAE0 0.06903724913680313 5.353138003220564e-15
Log2FC SC VAE1 -0.35928593051293045 0.0
Log2FC SC VAE2 0.4474914576959328 0.0
VAE0 H3K4me1 -0.013568556295341615 0.12482123994503176
VAE0 H3K4me2 0.18887754682460808 4.3799637480020857e-103
VAE0 H3K4me3 -0.06585650111025299 8.830832983169246e-14
VAE0 H3K27ac -0.021472303565038334 0.01513753080634104
VAE0 H3K36me3 -0.14637831865282763 3.1818613224446687e-62
VAE0 H3K27me3 0.5530783713203921 0.0
VAE0 Log2FC FB 0.23386004862667245 1.6353603410522057e-158
VAE0 Log2FC MB 0.09497872033347349 4.893067037273455e-27
VAE0 Log2FC HB -0.06055799388753807 7.072852121471026e-12
VAE0 Log2FC SC 0.06903724913680313 5.353138003220564e-15
VAE0 VAE0 1.0 0.0
VAE0 VAE1 -0.46110326962849063 0.0
VAE0 VAE2 0.0553254384134554 3.7809955029025667e-10
VAE1 H3K4me1 -0.031975417695767415 0.00029717150125224174
VAE1 H3K4me2 -0.19240476207447962 5.701135438643352e-107
VAE1 H3K4me3 0.18648158069639809 1.7257177250362483e-100
VAE1 H3K27ac 0.16479213573088783 1.3658104535434414e-78
VAE1 H3K36me3 0.2773544371972296 1.0166011378721364e-224
VAE1 H3K27me3 -0.8554111444358766 0.0
VAE1 Log2FC FB -0.42031788136966924 0.0
VAE1 Log2FC MB -0.3835940752982142 0.0
VAE1 Log2FC HB -0.25178163304077034 3.0367592025966925e-184
VAE1 Log2FC SC -0.35928593051293045 0.0
VAE1 VAE0 -0.46110326962849063 0.0
VAE1 VAE1 1.0 0.0
VAE1 VAE2 -0.3076063848742393 1.5155595210118842e-278
VAE2 H3K4me1 -0.07362293623376154 7.491335391145723e-17
VAE2 H3K4me2 -0.09528118666911108 3.36413886621527e-27
VAE2 H3K4me3 -0.4574592637070526 0.0
VAE2 H3K27ac -0.4181662263570533 0.0
VAE2 H3K36me3 -0.44625458684523317 0.0
VAE2 H3K27me3 0.3788059166332001 0.0
VAE2 Log2FC FB 0.5571965727331442 0.0
VAE2 Log2FC MB 0.40768272856880644 0.0
VAE2 Log2FC HB 0.23197909457281732 6.183849194431829e-156
VAE2 Log2FC SC 0.44749145769593274 0.0
VAE2 VAE0 0.0553254384134554 3.7809955029025667e-10
VAE2 VAE1 -0.3076063848742393 1.5155595210118842e-278
VAE2 VAE2 1.0 0.0
<Figure size 216x216 with 0 Axes>
  external_gene_name  wt11fb_merged-rep  wt13fb_merged-rep  wt15fb_merged-rep  \
0              Foxg1           8.161763           9.036692           9.295708   
1                En2           0.494674           0.168652           0.353709   
2               Sox3           7.329884           7.220449           5.700304   
3              Hoxc9           0.070489           0.020139           0.114239   

   wt18fb_merged-rep  wt11mb_merged-rep  wt13mb_merged-rep  wt15mb_merged-rep  \
0           9.176002           3.555796           0.152191           0.326289   
1           0.413756           7.499362           8.031306           7.013888   
2           4.480171           7.569871           6.390573           4.469231   
3           0.111092           0.071978           0.022155           0.032423   

   wt18mb_merged-rep  wt11hb_merged-rep  ...  ko15mb_merged-rep  \
0           1.557369           2.814731  ...           4.962096   
1           6.668011           6.872836  ...           6.280874   
2           4.535570           7.260694  ...           3.079978   
3           0.016071           0.118288  ...           4.920412   

   ko18mb_merged-rep  ko11hb_merged-rep  ko13hb_merged-rep  ko15hb_merged-rep  \
0           5.039551           5.698836           4.590381           4.688194   
1           6.268489           4.803762           5.565673           6.119783   
2           3.464150           7.339934           3.056591           2.845606   
3           4.175629           2.662632           5.024299           4.750092   

   ko18hb_merged-rep  ko11sc_merged-rep  ko13sc_merged-rep  ko15sc_merged-rep  \
0           4.667710           1.161890           3.216371           3.642766   
1           4.860775           3.372272           5.201905           4.665178   
2           2.955592           6.693111           3.609604           3.244365   
3           4.168916           6.278640           5.842700           5.185208   

   ko18sc_merged-rep  
0           3.737086  
1           4.312455  
2           3.485175  
3           5.005286  

[4 rows x 33 columns]
  external_gene_name   wt11fb1   wt11fb2   wt13fb1   wt13fb2   wt15fb1  \
0              Foxg1  0.671851  0.638786  0.719515  0.732931  0.539402   
1                En2  0.339403  0.355130  0.342059  0.346833  0.272912   
2               Sox3  0.637965  0.643287  0.620143  0.613288  0.468289   
3              Hoxc9  0.081933  0.117844  0.074345  0.082429  0.062036   

    wt15fb2   wt18fb1   wt18fb2   wt11mb1  ...  \
0  0.491137  0.438017  0.471832  0.465552  ...   
1  0.274512  0.261399  0.262437  0.274992  ...   
2  0.448809  0.371576  0.410703  0.611615  ...   
3  0.078425  0.071404  0.060219  0.068756  ...   

   hindbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF658ZBC_signal_log2  \
0                                           0.947014                         
1                                           0.843326                         
2                                           0.092615                         
3                                           0.936437                         

   hindbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF086VKO_signal_log2  \
0                                           1.000000                         
1                                           0.827006                         
2                                           0.087428                         
3                                           0.917355                         

   hindbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF787IGD_signal_log2  \
0                                           0.971759                         
1                                           0.779451                         
2                                           0.005442                         
3                                           0.938630                         

   midbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF942MEP_signal_log2  \
0                                           0.797789                        
1                                           0.873764                        
2                                           0.362158                        
3                                           0.998502                        

   midbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF041KRQ_signal_log2  \
0                                           0.738777                        
1                                           0.807582                        
2                                           0.157983                        
3                                           0.990907                        

   midbrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF635JKX_signal_log2  \
0                                           0.736539                        
1                                           0.833914                        
2                                           0.330756                        
3                                           1.000000                        

   midbrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF276UEL_signal_log2  \
0                                           0.741475                        
1                                           0.836261                        
2                                           0.257371                        
3                                           1.000000                        

   midbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF402CBS_signal_log2  \
0                                           0.916310                        
1                                           0.857517                        
2                                           0.113710                        
3                                           0.996239                        

   midbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF962ZLC_signal_log2  \
0                                           0.838678                        
1                                           0.824938                        
2                                           0.069298                        
3                                           0.996513                        

   midbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF887CCI_signal_log2  
0                                           0.789708                       
1                                           0.892763                       
2                                           0.003580                       
3                                           1.000000                       

[4 rows x 98 columns]
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/seaborn/matrix.py:1205: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  self.fig.tight_layout(**tight_params)
  external_gene_name      VAE0      VAE1      VAE2
0              Foxg1 -4.246739 -3.491437 -0.431496
1                En2 -1.124241 -2.788467  0.837881
2               Sox3  0.485786 -0.483560 -1.446952
3              Hoxc9 -0.513488 -4.328111  1.634701

Visualisations

In [12]:
ko_cols = [c for c in df_input.columns if 'ko' in c]
wt_cols = [c for c in df_input.columns if 'wt' in c]
# get IDs of the KO cols 
ko_col_ids = []
for i, c in enumerate(df_input.columns):
    if 'ko' in c:
        ko_col_ids.append(i)

bin_cmap = 'bone'
# Plot the input space WT and KO
merged_wt = [c for c in merged_cols if 'wt' in c]
merged_ko = [c for c in merged_cols if 'ko' in c]
mb_genes = ['En1', 'En2', 'Lmx1a', 'Otx2', 'Sall4']

plot_gene_heatmap(df, fb_genes, mb_genes, hb_genes, sc_genes, 
                  merged_wt, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=True, cmap=bin_cmap,
                  method='input', title=f'All markers input WT {experiment_name}')

plot_gene_heatmap(df, fb_genes, mb_genes, hb_genes, sc_genes, 
                  merged_ko, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=True,  cmap=bin_cmap,
                  method='input', title=f'All markers input KO {experiment_name}')

# Plot the decoding space for KO and then WT
plot_gene_heatmap(df_input, fb_genes, mb_genes, hb_genes, sc_genes, 
                  wt_cols, all_vae_data, vae_mse, 
                  gene_name, merge_reps=True, mark='H3K27me3', cmap=bin_cmap,
                  method='decoding', title=f'All markers decoding WT {experiment_name}')


# Plot the latent space
plot_gene_heatmap(df, fb_genes, mb_genes, hb_genes, sc_genes, 
                  ['VAE0', 'VAE1', 'VAE2'], vae_data, vae_mse,
                  gene_name, 
                   cmap=div_cmap,
                  mark='H3K27me3', method='latent', title=f'All markers latent {experiment_name}')


progenitors = ['Sox2', 'Sox1', 'Sox3', 'Hes1', 'Hes5']
neurons = ['Snap25', 'Syt1', 'Slc32a1','Slc17a6', 'Syn1']
glia = ['Cspg4', 'Aqp4', 'Slc6a11', 'Olig1', 'Igfbp3']


# Plot the input space
plot_gene_heatmap(df, progenitors, neurons, glia, [], 
                  merged_wt, vae_data, vae_mse,
                  gene_name, mark='H3K27me3', method='input', cmap=bin_cmap,
                  merge_reps=True, title=f'Time markers input WT {experiment_name}')
plot_gene_heatmap(df, progenitors, neurons, glia, [], 
                  merged_ko, vae_data, vae_mse,
                  gene_name, mark='H3K27me3', method='input', cmap=bin_cmap,
                  merge_reps=True, title=f'Time markers input KO {experiment_name}')
# Plot the decoding space
plot_gene_heatmap(df_input, progenitors, neurons, glia, [], 
                  wt_cols, all_vae_data, vae_mse, 
                  gene_name, mark='H3K27me3', method='decoding', cmap=bin_cmap,
                  merge_reps=True, title=f'Time markers decoding WT {experiment_name}')
# plot_gene_heatmap(df_input, progenitors, neurons, glia, [], 
#                   ko_cols, vae_data, vae_mse, 
#                   gene_name, mark='H3K27me3', method='decoding', cmap=bin_cmap,
#                   merge_reps=True, title=f'Time markers decoding KO {experiment_name}', 
#                   input_col_ids=ko_col_ids)

# Plot the latent space

plot_gene_heatmap(df, progenitors, neurons, glia, [], 
                  ['VAE0', 'VAE1', 'VAE2'], all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', method='latent', 
                   cmap=div_cmap,  title=f'Time markers latent {experiment_name}')
                  
# -----------------------------------------------------------------------------------
#                         Plot the genes on a scatter plot
# -----------------------------------------------------------------------------------
gene_markers_ns = [['Slc32a1', 'Gad1', 'Gad2', 'Slc6a1'],
                    ['Slc17a6', 'VGLUT2', 'Slc17a7', 'VGLUT1', 'Slc17a8', 'VGLUT3', 'Slc1a1', 'Slc1a2', 'Slc1a6'],
                    ['Chat', 'Slc5a7', 'Slc18a3', 'Ache'],
                    ['Tubb3', 'Snap25', 'Syt1'],
                    ['Gfap', 'Olig2'],
                    ['Sox2', 'Hes1', 'Hes5', 'Vim']]

marker_labels_ns = ['NS GABAergic', 'NS Glutamatergic', 'NS Cholinergic', 'NS Neurons', 'NS Glia', 'NS Progenitors']

vae_vis.plot_values_on_scatters(df_input, gene_name, marker_labels_ns,
                            gene_markers_ns, output_dir=fig_dir, plt_bg=False,vae_data=vae_data,
                            title=f'Markers NS {experiment_name}', fig_type="pdf",
                            show_plt=True, save_fig=True)

gene_markers_sep = [['Emx1', 'Eomes', 'Tbr1', 'Foxg1', 'Lhx6'], 
                    ['En1', 'En2', 'Lmx1a', 'Bhlhe23', 'Sall4'], 
                    ['Hoxb1', 'Krox20', 'Fev', 'Hoxd3', 'Phox2b'],
                    ['Hoxd8', 'Hoxd9', 'Hoxd10', 'Hoxd11', 'Hoxd12', 'Hoxd13', 'Hoxa7', 'Hoxa9', 'Hoxa10', 'Hoxa11', 
                    'Hoxa13', 'Hoxb9', 'Hoxb13',  'Hoxc8', 'Hoxc9', 'Hoxc10', 'Hoxc11', 'Hoxc12', 'Hoxc13'],
                    ['Ccna1', 'Ccna2', 'Ccnd1', 'Ccnd2', 'Ccnd3', 'Ccne1', 'Ccne2', 'Cdc25a', 
                    'Cdc25b', 'Cdc25c', 'E2f1', 'E2f2', 'E2f3', 'Mcm10', 'Mcm5', 'Mcm3', 'Mcm2', 'Cip2a'],
                    ['Cdkn1a', 'Cdkn1b', 'Cdkn1c', 'Cdkn2a', 'Cdkn2b', 'Cdkn2c', 'Cdkn2d'],
                    ['Sox2', 'Sox1', 'Sox3', 'Hes1', 'Hes5'],
                    ['Snap25', 'Syt1', 'Slc32a1','Slc17a6', 'Syn1'],
                    ['Cspg4', 'Aqp4', 'Slc6a11', 'Olig1', 'Igfbp3'],
                    ['Foxg1'], 
                    ['En2'], 
                    ['Phox2b'],
                    ['Hoxc9'],
                    ['Sox3']
                    ]

marker_labels_sep = ['forebrain', 'midbrain', 'hindbrain',  'spinalcord', 
                     'Proliferation', 'Negative regulators of Cell Cycle', 
                    'progenitors', 'neurons', 'glia',
                     'Foxg1', 'En2', 'Phox2b', 'Hoxc9', 'Sox3'
                    ]
color_map = {}
i = 4
for c in marker_labels_sep:
    if 'brain' in c or 'spinal' in c:
        if 'spinal' in c:
            color_map[c] = sc_colour
        else:
            color_map[c] = get_tissue_colour(c.lower())
    else:
        color_map[c] = sci_colour[i]
    i += 1
vae_vis.plot_values_on_scatters(df_input, gene_name, marker_labels_sep,
                            gene_markers_sep, output_dir=fig_dir, plt_bg=False,vae_data=vae_data, fig_type="svg",
                            title=f'Markers significant {experiment_name}',
                            show_plt=False, save_fig=False, color_map=color_map, angle_plot=15)

col_id = len(wt_cols)
ko_cols_i = [i for i, c in enumerate(df_input.columns) if 'ko' in c and 'merged' not in c]


plot_gene_heatmap(df_input, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  df_input.columns, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=rna_cmap, input_col_ids=ko_cols_i,
                  method='decoding', title=f'RNA KO DEC {experiment_name}')
col_id = 0
wt_cols_i = [i for i, c in enumerate(df_input.columns) if 'wt' in c and 'merged' not in c]

plot_gene_heatmap(df_input, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  df_input.columns, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=rna_cmap, input_col_ids=wt_cols_i,
                  method='decoding', title=f'RNA WT DEC {experiment_name}')
log2_cols = [c for c in df_input.columns if 'log2Fold' in c]
log2_cols_i = [i for i, c in enumerate(df_input.columns) if 'log2Fold' in c]

plot_gene_heatmap(df_input, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  df_input.columns, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=div_cmap, input_col_ids=log2_cols_i,
                  method='decoding', title=f'log2FC DEC {experiment_name}')

h3k_cols = [c for c in df_input.columns if 'H3K27me3' in c and 'signal' in c and 'median' not in c and 'brain' in c]
h3k_cols_i = [i for i, c in enumerate(df_input.columns) if 'H3K27me3' in c and 'signal' in c and 'median' not in c and 'brain' in c]

plot_gene_heatmap(df_input, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  df_input.columns, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=hist_cmap, input_col_ids=h3k_cols_i,
                  method='decoding', title=f'H3K WT DEC {experiment_name}')

# Ploot all the raw H3K values on teh scatter plot
h3k_cols = [c for c in df.columns if 'H3K27me3' in c and 'signal' in c and 'median' not in c and 'brain' in c]
tmp_df = df.fillna(0)
feature_obs_ax = vae_vis.plot_feature_scatters(tmp_df, "", columns=h3k_cols, vae_data=vae_data, 
                                               show_plt=False, output_dir=fig_dir, fig_type="svg", 
                                               save_fig=False, title=f'{experiment_name}',
                                               angle_plot=315, cmap=hist_cmap, vmin=0, vmax=10)


# Plot  genes on heatmap
plot_gene_heatmap(df, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  ko_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=True,  cmap=rna_cmap,
                  method='input', title=f'RNA KO {experiment_name}')
plot_gene_heatmap(df, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  wt_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=True,  cmap=rna_cmap,
                  method='input', title=f'RNA WT {experiment_name}')
h3k_cols = [c for c in df.columns if 'H3K27me3' in c and 'signal' in c and 'median' not in c and 'brain' in c]
print(h3k_cols)
plot_gene_heatmap(df, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  h3k_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=True,  cmap=hist_cmap,
                  method='input', title=f'H3K WT {experiment_name}')
log2_cols = [c for c in df.columns if 'log2Fold' in c]
print(log2_cols)
plot_gene_heatmap(df, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  log2_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=True,  cmap=div_cmap,
                  method='input', title=f'log2FC {experiment_name}')

ko_cols = [c for c in df_all if 'ko' in c and 'merged' in c]
plot_gene_heatmap(df_all, ['Sox1'], ['Sox2'], ['Sox3'], [], 
                  ko_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=True,  cmap=rna_cmap,
                  method='input', title=f'Sox RNA KO {experiment_name}')
wt_cols = [c for c in df_all if 'wt' in c and 'merged' in c]

plot_gene_heatmap(df_all, ['Sox1'], ['Sox2'], ['Sox3'], [],
                  wt_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=True,  cmap=rna_cmap,
                  method='input', title=f'Sox RNA WT {experiment_name}')

plot_gene_heatmap(df, ['Sox3'], ['Foxg1'], ['En2'], ['Hoxc9'], 
                  ['VAE0', 'VAE1', 'VAE2'], all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=bin_cmap,
                  method='input', title=f'Latent {experiment_name}')

# Plot feature correlation
vae_vis.plot_feature_correlation(df_observed, '', columns=observed_cols, show_plt=True, cmap="RdBu_r",
                                 title=f'Feature vs observed features {experiment_name}',
                             output_dir=fig_dir, save_fig=True)

# Plot feature correlations for heatmap 
vae_vis.plot_feature_correlation(df, '', columns=vae_cols, show_plt=True, cmap='RdBu_r',
                             output_dir=fig_dir, save_fig=True, title=f'features VAE {experiment_name}')


"""
Plot the heatmaps of the Hox and other tisue specific genes
"""
plot_gene_heatmap(df_all, ['Pax2'], ['Hoxb9'], ['Hoxc9'], ['Hoxd9'],
                  wt_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=rna_cmap,
                  method='input', title=f'Sox pax2 RNA WT {experiment_name}')

plot_gene_heatmap(df_all, ['Pax2'], ['Hoxb9'], ['Hoxc9'], ['Hoxd9'],
                  ko_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=rna_cmap,
                  method='input', title=f'pax2 RNA KO {experiment_name}')

mb_genes = ['En1', 'En2', 'Lmx1a', 'Bhlhe23', 'Sall4']
hb_genes = ['Phox2b', 'Krox20', 'Fev', 'Hoxb1',  'Hoxd3']
mb_genes = ['En1', 'En2', 'Lmx1a', 'Bhlhe23', 'Sall4', 'Pax7', 'Lhx9', 'Evx1', 'Sox14', 
           'Gata3', 'Dmbx1', 'Tal1', 'Pou4f3', 'Pouf4f2', 'Gata3', 'Barhl1', 'Pax5', 'Dmbx1',
           'Pou4f1', 'Irx4', 'Pax7', 'Pax1', 'Pax8', 'Ebf2', 'Patx3', 'Onecut1', 'Otx2', 
           'Lhx5', 'Irx3', 'Irx5', 'Ebf3', 'Foxb1', 'Irx2', 'Shox2', 'Foxa2', 'Irx1', 'Tcfap2b']

plot_gene_heatmap(df_all, ['Otx2'], ['En2'], ['Phox2b'], ['Hoxd3'],
                  wt_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=rna_cmap,
                  method='input', title=f'Mid RNA WT {experiment_name}')


plot_gene_heatmap(df_all, ['Otx2'], ['En2'], ['Phox2b'], ['Hoxd3'],
                  ko_cols, all_vae_data, vae_mse,
                  gene_name, mark='H3K27me3', merge_reps=False,  cmap=rna_cmap,
                  method='input', title=f'Mid RNA KO {experiment_name}')


# Plot gene names on scatter
gene_markers_sep = [['Cdkn1a'], ['Cdkn2a'], ['Cdkn2b'], ['Cip2a'], ['Cdc25c'], ['Mcm10'],
                    ['E2f1'], ['Ccna2'], ['Ccnd1'], ['Aqp4'], ['Snap25'], ['Hes5']
                    ]

marker_labels_sep = ['Cdkn1a', 'Cdkn2a', 'Cdkn2b',  'Cip2a', 
                     'Cdc25c', 'Mcm10', 
                    'E2f1', 'Ccna2', 'Ccnd1',
                     'Aqp4', 'Snap25', 'Hes5'
                    ]
color_map = {}
i = 4
for c in marker_labels_sep:
    if 'brain' in c or 'spinal' in c:
        if 'spinal' in c:
            color_map[c] = sc_colour
        else:
            color_map[c] = get_tissue_colour(c.lower())
    else:
        color_map[c] = sci_colour[i]
    i += 1
vae_vis.plot_values_on_scatters(df_input, gene_name, marker_labels_sep,
                            gene_markers_sep, output_dir=fig_dir, plt_bg=False,vae_data=vae_data, fig_type="svg",
                            title=f'Markers specific {experiment_name}',
                            show_plt=False, save_fig=False, color_map=color_map, angle_plot=315)
  external_gene_name  wt11fb_merged-rep  wt13fb_merged-rep  wt15fb_merged-rep  \
0              Foxg1           0.876270           0.971738           1.000000   
1               Lhx6           0.523575           0.918995           0.942159   
2               Tbr1           0.699981           0.964443           1.000000   
3               Emx1           0.835460           1.000000           0.930334   
4              Eomes           0.846631           1.000000           0.988013   

   wt18fb_merged-rep  wt11mb_merged-rep  wt13mb_merged-rep  wt15mb_merged-rep  \
0           0.986938           0.373690           0.002306           0.021302   
1           1.000000           0.307570           0.193575           0.177374   
2           0.988598           0.398743           0.167463           0.246851   
3           0.803598           0.396227           0.223458           0.136889   
4           0.851878           0.517927           0.330729           0.369411   

   wt18mb_merged-rep  wt11hb_merged-rep  wt13hb_merged-rep  wt15hb_merged-rep  \
0           0.155632           0.292829           0.074193           0.048903   
1           0.327673           0.309588           0.000000           0.053135   
2           0.276605           0.007015           0.015224           0.022867   
3           0.070040           0.036411           0.001018           0.002749   
4           0.565673           0.038614           0.049856           0.060991   

   wt18hb_merged-rep  wt11sc_merged-rep  wt13sc_merged-rep  wt15sc_merged-rep  \
0           0.043263           0.050391           0.007295           0.000000   
1           0.173792           0.260517           0.233555           0.259264   
2           0.065809           0.000000           0.015840           0.046058   
3           0.005990           0.029781           0.007285           0.000000   
4           0.387983           0.002949           0.019690           0.027024   

   wt18sc_merged-rep  
0           0.010509  
1           0.239460  
2           0.020940  
3           0.003238  
4           0.000000  
  external_gene_name  ko11fb_merged-rep  ko13fb_merged-rep  ko15fb_merged-rep  \
0              Foxg1           0.773348           1.000000           0.887473   
1               Lhx6           0.398225           0.687109           0.758063   
2               Tbr1           0.403798           1.000000           0.914116   
3               Emx1           0.741702           1.000000           0.729911   
4              Eomes           0.672796           1.000000           0.738654   

   ko18fb_merged-rep  ko11mb_merged-rep  ko13mb_merged-rep  ko15mb_merged-rep  \
0           0.849753           0.331556           0.553470           0.618689   
1           1.000000           0.179405           0.133045           0.535425   
2           0.857413           0.031918           0.452307           0.592030   
3           0.616446           0.185984           0.270611           0.277571   
4           0.527092           0.124368           0.442612           0.448207   

   ko18mb_merged-rep  ko11hb_merged-rep  ko13hb_merged-rep  ko15hb_merged-rep  \
0           0.631299           0.738634           0.558173           0.574097   
1           0.910984           0.461606           0.381082           0.704271   
2           0.580405           0.415415           0.470464           0.569589   
3           0.247316           0.656964           0.096604           0.200821   
4           0.264649           0.663738           0.160908           0.311206   

   ko18hb_merged-rep  ko11sc_merged-rep  ko13sc_merged-rep  ko15sc_merged-rep  \
0           0.570762                0.0           0.334478           0.403897   
1           0.941213                0.0           0.234253           0.533167   
2           0.549105                0.0           0.343418           0.473450   
3           0.225002                0.0           0.036088           0.176869   
4           0.038210                0.0           0.142803           0.128960   

   ko18sc_merged-rep  
0           0.419253  
1           0.639234  
2           0.475328  
3           0.149203  
4           0.000499  
  external_gene_name   wt11fb1   wt11fb2   wt13fb1   wt13fb2   wt15fb1  \
0              Foxg1  0.651374  0.616246  0.702013  0.716265  0.510660   
1               Lhx6  0.265170  0.272112  0.288759  0.315271  0.229377   
2               Tbr1  0.394852  0.392736  0.510099  0.543433  0.439186   
3               Emx1  0.275805  0.259906  0.340143  0.339263  0.193703   
4              Eomes  0.417776  0.399188  0.447063  0.457662  0.341451   

    wt15fb2   wt18fb1   wt18fb2   wt11mb1  ...   wt18hb1   wt18hb2   wt11sc1  \
0  0.459384  0.402949  0.438875  0.432203  ...  0.096878  0.080182  0.168878   
1  0.224232  0.210902  0.223946  0.158732  ...  0.096262  0.082205  0.099697   
2  0.392757  0.397371  0.410407  0.231358  ...  0.147376  0.129589  0.088842   
3  0.170773  0.165840  0.182951  0.200492  ...  0.046672  0.051763  0.109504   
4  0.322456  0.262088  0.303739  0.294473  ...  0.065220  0.049352  0.127809   

    wt11sc2   wt13sc1   wt13sc2   wt15sc1   wt15sc2   wt18sc1   wt18sc2  
0  0.215282  0.061059  0.073529  0.143397  0.073130  0.064234  0.057545  
1  0.102669  0.052637  0.059232  0.091481  0.075065  0.077607  0.077905  
2  0.115249  0.055256  0.074429  0.147427  0.096196  0.111714  0.105058  
3  0.135250  0.057725  0.054818  0.081421  0.060096  0.058275  0.039812  
4  0.133436  0.034232  0.034193  0.059809  0.041285  0.037410  0.043662  

[5 rows x 33 columns]
  external_gene_name      VAE0      VAE1      VAE2
0              Foxg1 -4.246739 -3.491437 -0.431496
1               Lhx6 -1.741587 -2.269459  1.171885
2               Tbr1 -3.517376 -3.190596  0.448478
3               Emx1 -1.227572 -1.977068 -0.350470
4              Eomes -2.280337 -1.771218  1.000042
  external_gene_name  wt11fb_merged-rep  wt13fb_merged-rep  wt15fb_merged-rep  \
0               Hes1           1.000000           0.859668           0.469616   
1               Sox2           0.943380           0.949568           0.707070   
2               Hes5           0.651925           0.732021           0.321306   
3               Sox1           0.911189           1.000000           0.836312   
4               Sox3           0.950178           0.927460           0.611877   

   wt18fb_merged-rep  wt11mb_merged-rep  wt13mb_merged-rep  wt15mb_merged-rep  \
0           0.086373           0.652471           0.275798           0.029628   
1           0.550415           1.000000           0.622615           0.217100   
2           0.193179           1.000000           0.900866           0.299143   
3           0.786355           0.932404           0.751252           0.426557   
4           0.358576           1.000000           0.755177           0.356305   

   wt18mb_merged-rep  wt11hb_merged-rep  wt13hb_merged-rep  wt15hb_merged-rep  \
0           0.000000           0.594827           0.201936           0.023484   
1           0.375949           0.853657           0.468725           0.236694   
2           0.280754           0.843860           0.450375           0.273479   
3           0.474636           0.800309           0.481115           0.281785   
4           0.370077           0.935815           0.379595           0.191047   

   wt18hb_merged-rep  wt11sc_merged-rep  wt13sc_merged-rep  wt15sc_merged-rep  \
0           0.012934           0.759841           0.314388           0.321688   
1           0.221981           0.794292           0.420991           0.000000   
2           0.301305           0.623341           0.463581           0.000000   
3           0.232632           0.417540           0.215308           0.000000   
4           0.258589           0.774401           0.244539           0.000000   

   wt18sc_merged-rep  
0           0.007980  
1           0.230233  
2           0.210562  
3           0.126464  
4           0.150160  
  external_gene_name  ko11fb_merged-rep  ko13fb_merged-rep  ko15fb_merged-rep  \
0               Hes1           1.000000           0.855647           0.303016   
1               Sox2           1.000000           0.629236           0.294420   
2               Hes5           0.980069           0.589436           0.097420   
3               Sox1           1.000000           0.716547           0.494781   
4               Sox3           1.000000           0.511926           0.243986   

   ko18fb_merged-rep  ko11mb_merged-rep  ko13mb_merged-rep  ko15mb_merged-rep  \
0           0.206161           0.596411           0.693812           0.215795   
1           0.292689           0.832062           0.463111           0.152282   
2           0.157003           1.000000           0.453238           0.000000   
3           0.460824           0.723482           0.314919           0.235458   
4           0.136114           0.924000           0.277327           0.051959   

   ko18mb_merged-rep  ko11hb_merged-rep  ko13hb_merged-rep  ko15hb_merged-rep  \
0           0.253627           0.820008           0.340260           0.159875   
1           0.188908           0.937412           0.129238           0.000000   
2           0.224047           0.972094           0.104580           0.046064   
3           0.241585           0.899023           0.001515           0.077447   
4           0.137127           0.996363           0.046774           0.000000   

   ko18hb_merged-rep  ko11sc_merged-rep  ko13sc_merged-rep  ko15sc_merged-rep  \
0           0.327860           0.820154           0.243983           0.000000   
1           0.066738           0.787053           0.182959           0.011233   
2           0.205237           0.830015           0.311043           0.132207   
3           0.130070           0.202840           0.042317           0.000000   
4           0.024383           0.852967           0.169373           0.088402   

   ko18sc_merged-rep  
0           0.234035  
1           0.162649  
2           0.199092  
3           0.113725  
4           0.141788  
  external_gene_name   wt11fb1   wt11fb2   wt13fb1   wt13fb2   wt15fb1  \
0               Hes1  0.562327  0.573148  0.513439  0.511221  0.339022   
1               Sox2  0.890058  0.862204  0.986192  1.000000  0.891988   
2               Hes5  0.997770  0.977734  1.000000  0.998417  0.791560   
3               Sox1  0.708487  0.691878  0.703368  0.700000  0.562878   
4               Sox3  0.989828  0.998114  0.962080  0.951408  0.725655   

    wt15fb2   wt18fb1   wt18fb2   wt11mb1  ...   wt18hb1   wt18hb2   wt11sc1  \
0  0.337763  0.290399  0.310773  0.448314  ...  0.191987  0.220607  0.436777   
1  0.865238  0.867213  0.889991  0.843084  ...  0.668089  0.667190  0.794100   
2  0.760668  0.718142  0.738001  0.893425  ...  0.464906  0.449167  0.772672   
3  0.549389  0.500437  0.524738  0.640956  ...  0.344518  0.342858  0.512219   
4  0.695325  0.575080  0.635997  0.948804  ...  0.396670  0.425898  0.882131   

    wt11sc2   wt13sc1   wt13sc2   wt15sc1   wt15sc2   wt18sc1   wt18sc2  
0  0.451767  0.309465  0.327069  0.336965  0.254656  0.208634  0.206280  
1  0.813340  0.800674  0.814691  0.725227  0.689030  0.643070  0.677105  
2  0.781266  0.645281  0.646778  0.571780  0.517889  0.448957  0.480564  
3  0.527953  0.428738  0.431834  0.404690  0.342607  0.304157  0.322028  
4  0.918496  0.683468  0.648035  0.515722  0.473399  0.372160  0.396961  

[5 rows x 33 columns]
  external_gene_name      VAE0      VAE1      VAE2
0               Hes1 -1.093495 -2.153414  0.379847
1               Sox2 -0.410742 -1.581483 -0.970380
2               Hes5 -0.814333 -1.271878  0.099025
3               Sox1 -1.627672 -1.994104  0.960492
4               Sox3  0.485786 -0.483560 -1.446952
<Figure size 360x360 with 0 Axes>
  external_gene_name   ko11fb1   ko11fb2   ko13fb1   ko13fb2   ko15fb1  \
0               Sox3  0.586399  0.644498  0.474212  0.473926  0.333917   
1              Foxg1  0.428189  0.648203  0.647360  0.628331  0.549614   
2                En2  0.333669  0.369893  0.480343  0.470253  0.441151   
3              Hoxc9  0.159345  0.122988  0.512187  0.487565  0.427893   

    ko15fb2   ko18fb1   ko18fb2   ko11mb1  ...   ko18hb1   ko18hb2   ko11sc1  \
0  0.334654  0.269276  0.291982  0.549281  ...  0.244825  0.241106  0.548560   
1  0.505750  0.499243  0.508478  0.349312  ...  0.366825  0.329146  0.235718   
2  0.412187  0.435685  0.431427  0.379986  ...  0.391465  0.393974  0.391497   
3  0.415092  0.410514  0.438715  0.346201  ...  0.424986  0.448019  0.469797   

    ko11sc2   ko13sc1   ko13sc2   ko15sc1   ko15sc2   ko18sc1   ko18sc2  
0  0.570996  0.362069  0.382906  0.272995  0.284877  0.233546  0.237827  
1  0.211535  0.267740  0.199929  0.201376  0.240192  0.212157  0.193566  
2  0.348564  0.406796  0.386520  0.356255  0.349229  0.333404  0.348832  
3  0.430479  0.504235  0.491412  0.448298  0.429166  0.388207  0.432465  

[4 rows x 33 columns]
<Figure size 144x144 with 0 Axes>
  external_gene_name   wt11fb1   wt11fb2   wt13fb1   wt13fb2   wt15fb1  \
0               Sox3  0.637965  0.643287  0.620143  0.613288  0.468289   
1              Foxg1  0.671851  0.638786  0.719515  0.732931  0.539402   
2                En2  0.339403  0.355130  0.342059  0.346833  0.272912   
3              Hoxc9  0.081933  0.117844  0.074345  0.082429  0.062036   

    wt15fb2   wt18fb1   wt18fb2   wt11mb1  ...   wt18hb1   wt18hb2   wt11sc1  \
0  0.448809  0.371576  0.410703  0.611615  ...  0.256985  0.275758  0.568792   
1  0.491137  0.438017  0.471832  0.465552  ...  0.149923  0.134207  0.217695   
2  0.274512  0.261399  0.262437  0.274992  ...  0.243371  0.267342  0.353234   
3  0.078425  0.071404  0.060219  0.068756  ...  0.158014  0.211361  0.402962   

    wt11sc2   wt13sc1   wt13sc2   wt15sc1   wt15sc2   wt18sc1   wt18sc2  
0  0.592149  0.441193  0.418434  0.333451  0.306267  0.241242  0.257172  
1  0.261373  0.116207  0.127946  0.193710  0.127570  0.119197  0.112900  
2  0.357714  0.308391  0.334216  0.328058  0.296918  0.270624  0.266914  
3  0.415484  0.310422  0.402230  0.347434  0.338317  0.275885  0.280445  

[4 rows x 33 columns]
  external_gene_name  log2FoldChange_fb  log2FoldChange_mb  log2FoldChange_hb  \
0               Sox3           0.065699           0.045797           0.073167   
1              Foxg1           0.159403           0.348364           0.718591   
2                En2           0.398856           0.354167           0.439669   
3              Hoxc9           0.957985           0.907704           0.783988   

   log2FoldChange_sc  log2FoldChange_a11  log2FoldChange_a13  \
0           0.050222            0.103656            0.055335   
1           0.800201            0.077492            0.155711   
2           0.346328            0.325586            0.318841   
3           0.557835            0.951016            0.941078   

   log2FoldChange_a15  log2FoldChange_a18  log2FoldChange_p11  \
0            0.052226            0.070133            0.179368   
1            0.263935            0.318878            0.712789   
2            0.370783            0.421093            0.355640   
3            0.907948            0.939920            0.681212   

   log2FoldChange_p13  log2FoldChange_p15  log2FoldChange_p18  
0            0.064941            0.111481            0.066170  
1            0.731146            0.755003            0.731147  
2            0.395622            0.407730            0.372515  
3            0.708877            0.713662            0.669382  
  external_gene_name  \
0               Sox3   
1              Foxg1   
2                En2   
3              Hoxc9   

   forebrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF115VPJ_signal_log2  \
0                                           0.345730                         
1                                           0.704665                         
2                                           0.841240                         
3                                           0.996819                         

   forebrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF592HST_signal_log2  \
0                                           0.092580                         
1                                           0.183111                         
2                                           0.681680                         
3                                           0.916329                         

   forebrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF397HZX_signal_log2  \
0                                           0.392304                         
1                                           0.310263                         
2                                           0.786048                         
3                                           0.998560                         

   forebrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF076ZNJ_signal_log2  \
0                                           0.061877                         
1                                           0.112726                         
2                                           0.798296                         
3                                           1.000000                         

   forebrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF591TWD_signal_log2  \
0                                           0.006241                         
1                                           0.074236                         
2                                           0.668177                         
3                                           0.949279                         

   forebrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF082ONF_signal_log2  \
0                                           0.005315                         
1                                           0.070333                         
2                                           0.650703                         
3                                           0.945391                         

   forebrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF686XPK_signal_log2  \
0                                           0.002208                         
1                                           0.058735                         
2                                           0.505680                         
3                                           0.865215                         

   hindbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF475JXJ_signal_log2  \
0                                           0.334388                         
1                                           0.832594                         
2                                           0.849694                         
3                                           0.990666                         

   hindbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF809JLW_signal_log2  \
0                                           0.189404                         
1                                           0.958432                         
2                                           0.792349                         
3                                           0.914692                         

   ...  \
0  ...   
1  ...   
2  ...   
3  ...   

   hindbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF658ZBC_signal_log2  \
0                                           0.092615                         
1                                           0.947014                         
2                                           0.843326                         
3                                           0.936437                         

   hindbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF086VKO_signal_log2  \
0                                           0.087428                         
1                                           1.000000                         
2                                           0.827006                         
3                                           0.917355                         

   hindbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF787IGD_signal_log2  \
0                                           0.005442                         
1                                           0.971759                         
2                                           0.779451                         
3                                           0.938630                         

   midbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF942MEP_signal_log2  \
0                                           0.362158                        
1                                           0.797789                        
2                                           0.873764                        
3                                           0.998502                        

   midbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF041KRQ_signal_log2  \
0                                           0.157983                        
1                                           0.738777                        
2                                           0.807582                        
3                                           0.990907                        

   midbrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF635JKX_signal_log2  \
0                                           0.330756                        
1                                           0.736539                        
2                                           0.833914                        
3                                           1.000000                        

   midbrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF276UEL_signal_log2  \
0                                           0.257371                        
1                                           0.741475                        
2                                           0.836261                        
3                                           1.000000                        

   midbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF402CBS_signal_log2  \
0                                           0.113710                        
1                                           0.916310                        
2                                           0.857517                        
3                                           0.996239                        

   midbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF962ZLC_signal_log2  \
0                                           0.069298                        
1                                           0.838678                        
2                                           0.824938                        
3                                           0.996513                        

   midbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF887CCI_signal_log2  
0                                           0.003580                       
1                                           0.789708                       
2                                           0.892763                       
3                                           1.000000                       

[4 rows x 22 columns]
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/seaborn/matrix.py:1205: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  self.fig.tight_layout(**tight_params)
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/scivae/vis.py:351: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
  fig = plt.figure()
  external_gene_name   ko11fb1  ko11fb2   ko13fb1   ko13fb2   ko15fb1  \
0               Sox3  0.938785      1.0  0.490566  0.515019  0.282135   
1              Foxg1  0.399059      1.0  0.864240  0.907562  0.796720   
2                En2  0.999684      0.0  0.568539  0.578491  0.459351   
3              Hoxc9  0.332753      0.0  0.942823  0.956517  0.786817   

    ko15fb2   ko18fb1   ko18fb2   ko11mb1  ...   ko18hb1   ko18hb2   ko11sc1  \
0  0.211148  0.128313  0.158717  0.803567  ...  0.004166  0.069234  0.781372   
1  0.790024  0.760058  0.764653  0.424918  ...  0.533096  0.532798  0.127241   
2  0.476414  0.399936  0.469709  0.815591  ...  0.479072  0.534291  0.410039   
3  0.795932  0.650076  0.710400  0.552940  ...  0.589719  0.624295  1.000000   

    ko11sc2   ko13sc1   ko13sc2   ko15sc1   ko15sc2   ko18sc1   ko18sc2  
0  0.876284  0.152762  0.197861  0.077266  0.118539  0.139331  0.158548  
1  0.000000  0.369131  0.308179  0.428317  0.363157  0.430157  0.386570  
2  0.081347  0.564060  0.568928  0.516123  0.428650  0.405513  0.415569  
3  0.968066  0.899169  0.913084  0.757540  0.819714  0.760162  0.752785  

[4 rows x 33 columns]
<Figure size 360x360 with 0 Axes>
  external_gene_name   wt11fb1   wt11fb2   wt13fb1   wt13fb2   wt15fb1  \
0               Sox3  0.987655  0.888969  0.919341  0.914714  0.548995   
1              Foxg1  0.905497  0.839103  0.962206  0.971014  0.989059   
2                En2  0.021750  0.076919  0.006142  0.011685  0.030719   
3              Hoxc9  0.016999  0.005155  0.000000  0.006330  0.000000   

    wt15fb2   wt18fb1   wt18fb2   wt11mb1  ...   wt18hb1   wt18hb2   wt11sc1  \
0  0.693739  0.294510  0.473605  1.000000  ...  0.320858  0.259908  0.760646   
1  1.000000  0.972821  0.990432  0.366511  ...  0.057609  0.041185  0.055598   
2  0.032995  0.030337  0.048266  0.929953  ...  0.106980  0.112892  0.044118   
3  0.035905  0.021010  0.013906  0.012152  ...  0.010465  0.473454  0.926013   

    wt11sc2   wt13sc1   wt13sc2   wt15sc1   wt15sc2   wt18sc1   wt18sc2  
0  0.786617  0.276225  0.278214  0.000000  0.096237  0.216120  0.161478  
1  0.057279  0.011313  0.016418  0.013319  0.000000  0.006830  0.027252  
2  0.067930  0.009606  0.027778  0.011913  0.015164  0.019509  0.014426  
3  0.919263  1.000000  0.995818  0.784096  0.892346  0.852279  0.898904  

[4 rows x 33 columns]
['forebrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF115VPJ_signal', 'forebrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF592HST_signal', 'forebrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF397HZX_signal', 'forebrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF076ZNJ_signal', 'forebrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF591TWD_signal', 'forebrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF082ONF_signal', 'forebrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF686XPK_signal', 'hindbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF475JXJ_signal', 'hindbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF809JLW_signal', 'hindbrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF435HPM_signal', 'hindbrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF324KBG_signal', 'hindbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF658ZBC_signal', 'hindbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF086VKO_signal', 'hindbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF787IGD_signal', 'midbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF942MEP_signal', 'midbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF041KRQ_signal', 'midbrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF635JKX_signal', 'midbrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF276UEL_signal', 'midbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF402CBS_signal', 'midbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF962ZLC_signal', 'midbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF887CCI_signal']
  external_gene_name  \
0               Sox3   
1              Foxg1   
2                En2   
3              Hoxc9   

   forebrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF115VPJ_signal  \
0                                           1.000000                    
1                                           0.983556                    
2                                           1.000000                    
3                                           1.000000                    

   forebrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF592HST_signal  \
0                                           0.000000                    
1                                           0.286343                    
2                                           0.100743                    
3                                           0.283206                    

   forebrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF397HZX_signal  \
0                                           0.555604                    
1                                           0.308459                    
2                                           0.249711                    
3                                           0.428984                    

   forebrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF076ZNJ_signal  \
0                                           0.000000                    
1                                           0.000000                    
2                                           0.434323                    
3                                           0.244270                    

   forebrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF591TWD_signal  \
0                                           0.000000                    
1                                           0.309227                    
2                                           0.158969                    
3                                           0.231445                    

   forebrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF082ONF_signal  \
0                                           0.000000                    
1                                           0.000000                    
2                                           0.049647                    
3                                           0.107695                    

   forebrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF686XPK_signal  \
0                                           0.000000                    
1                                           0.000000                    
2                                           0.125367                    
3                                           0.000000                    

   hindbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF475JXJ_signal  \
0                                           0.654686                    
1                                           0.983348                    
2                                           0.558443                    
3                                           0.897566                    

   hindbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF809JLW_signal  ...  \
0                                           0.000000                   ...   
1                                           0.538108                   ...   
2                                           0.135460                   ...   
3                                           0.272632                   ...   

   hindbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF658ZBC_signal  \
0                                           0.541669                    
1                                           0.852510                    
2                                           0.168170                    
3                                           0.260769                    

   hindbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF086VKO_signal  \
0                                           0.000000                    
1                                           0.597450                    
2                                           0.052538                    
3                                           0.168848                    

   hindbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF787IGD_signal  \
0                                           0.000000                    
1                                           0.483976                    
2                                           0.011061                    
3                                           0.134280                    

   midbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF942MEP_signal  \
0                                           0.660801                   
1                                           1.000000                   
2                                           0.534473                   
3                                           0.610359                   

   midbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF041KRQ_signal  \
0                                           0.000000                   
1                                           0.865415                   
2                                           0.049138                   
3                                           0.369078                   

   midbrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF635JKX_signal  \
0                                           0.000000                   
1                                           0.966515                   
2                                           0.270990                   
3                                           0.524347                   

   midbrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF276UEL_signal  \
0                                           0.710406                   
1                                           0.795924                   
2                                           0.225399                   
3                                           0.206282                   

   midbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF402CBS_signal  \
0                                           0.000000                   
1                                           0.607118                   
2                                           0.117276                   
3                                           0.257075                   

   midbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF962ZLC_signal  \
0                                           0.000000                   
1                                           0.414332                   
2                                           0.016693                   
3                                           0.112401                   

   midbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF887CCI_signal  
0                                           0.000000                  
1                                           0.537933                  
2                                           0.000000                  
3                                           0.073440                  

[4 rows x 22 columns]
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/seaborn/matrix.py:1205: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  self.fig.tight_layout(**tight_params)
['log2FoldChange_fb', 'log2FoldChange_mb', 'log2FoldChange_hb', 'log2FoldChange_sc', 'log2FoldChange_a11', 'log2FoldChange_a13', 'log2FoldChange_a15', 'log2FoldChange_a18', 'log2FoldChange_p11', 'log2FoldChange_p13', 'log2FoldChange_p15', 'log2FoldChange_p18']
  external_gene_name  log2FoldChange_fb  log2FoldChange_mb  log2FoldChange_hb  \
0               Sox3           0.186678           0.215256           0.403930   
1              Foxg1           0.000000           0.969118           0.883091   
2                En2           0.875505           0.000000           0.751336   
3              Hoxc9           0.774984           0.905491           0.674293   

   log2FoldChange_sc  log2FoldChange_a11  log2FoldChange_a13  \
0           0.965154            0.839535            0.000000   
1           1.000000            0.211348            0.616524   
2           0.938987            0.510267            0.531121   
3           0.000000            0.563688            1.000000   

   log2FoldChange_a15  log2FoldChange_a18  log2FoldChange_p11  \
0            0.210824            0.444475            1.000000   
1            0.515227            0.310291            0.603990   
2            0.413526            0.393134            0.291812   
3            0.765863            0.740117            0.298132   

   log2FoldChange_p13  log2FoldChange_p15  log2FoldChange_p18  
0            0.544195            0.863352            0.689699  
1            0.883013            0.979874            0.953042  
2            0.795116            1.000000            0.741950  
3            0.445875            0.373453            0.100662  
  external_gene_name  ko11fb_merged-rep  ko13fb_merged-rep  ko15fb_merged-rep  \
0               Sox1                1.0           0.716547           0.494781   
1               Sox2                1.0           0.629236           0.294420   
2               Sox3                1.0           0.511926           0.243986   

   ko18fb_merged-rep  ko11mb_merged-rep  ko13mb_merged-rep  ko15mb_merged-rep  \
0           0.460824           0.723482           0.314919           0.235458   
1           0.292689           0.832062           0.463111           0.152282   
2           0.136114           0.924000           0.277327           0.051959   

   ko18mb_merged-rep  ko11hb_merged-rep  ko13hb_merged-rep  ko15hb_merged-rep  \
0           0.241585           0.899023           0.001515           0.077447   
1           0.188908           0.937412           0.129238           0.000000   
2           0.137127           0.996363           0.046774           0.000000   

   ko18hb_merged-rep  ko11sc_merged-rep  ko13sc_merged-rep  ko15sc_merged-rep  \
0           0.130070           0.202840           0.042317           0.000000   
1           0.066738           0.787053           0.182959           0.011233   
2           0.024383           0.852967           0.169373           0.088402   

   ko18sc_merged-rep  
0           0.113725  
1           0.162649  
2           0.141788  
  external_gene_name  wt11fb_merged-rep  wt13fb_merged-rep  wt15fb_merged-rep  \
0               Sox1           0.911189           1.000000           0.836312   
1               Sox2           0.943380           0.949568           0.707070   
2               Sox3           0.950178           0.927460           0.611877   

   wt18fb_merged-rep  wt11mb_merged-rep  wt13mb_merged-rep  wt15mb_merged-rep  \
0           0.786355           0.932404           0.751252           0.426557   
1           0.550415           1.000000           0.622615           0.217100   
2           0.358576           1.000000           0.755177           0.356305   

   wt18mb_merged-rep  wt11hb_merged-rep  wt13hb_merged-rep  wt15hb_merged-rep  \
0           0.474636           0.800309           0.481115           0.281785   
1           0.375949           0.853657           0.468725           0.236694   
2           0.370077           0.935815           0.379595           0.191047   

   wt18hb_merged-rep  wt11sc_merged-rep  wt13sc_merged-rep  wt15sc_merged-rep  \
0           0.232632           0.417540           0.215308                0.0   
1           0.221981           0.794292           0.420991                0.0   
2           0.258589           0.774401           0.244539                0.0   

   wt18sc_merged-rep  
0           0.126464  
1           0.230233  
2           0.150160  
  external_gene_name      VAE0      VAE1      VAE2
0               Sox3  0.485786 -0.483560 -1.446952
1              Foxg1 -4.246739 -3.491437 -0.431496
2                En2 -1.124241 -2.788467  0.837881
3              Hoxc9 -0.513488 -4.328111  1.634701
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K27me3 0.03880145459733418 1.1304167715365197e-05
H3K4me1 Log2FC FB -0.14880590787152698 2.8859404622978633e-64
H3K4me1 Log2FC MB -0.10387373575786396 4.872008964191265e-32
H3K4me1 Log2FC HB -0.05777615219411477 6.12378414825415e-11
H3K4me1 Log2FC SC -0.07950151137451965 2.1197279496874784e-19
H3K4me1 VAE0 -0.013568556295341615 0.12482123994503176
H3K4me1 VAE1 -0.031975417695767415 0.00029717150125224174
H3K4me1 VAE2 -0.07362293623376154 7.491335391145723e-17
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K27me3 0.1836859102996935 1.6625204625607636e-97
H3K4me2 Log2FC FB -0.12969526458358954 3.9896551047753745e-49
H3K4me2 Log2FC MB -0.09642120978180409 8.108800676805556e-28
H3K4me2 Log2FC HB -0.10550208768149451 5.2879602412044856e-33
H3K4me2 Log2FC SC -0.08178812465927765 1.9179743858493656e-20
H3K4me2 VAE0 0.18887754682460806 4.3799637480023355e-103
H3K4me2 VAE1 -0.1924047620744796 5.701135438644e-107
H3K4me2 VAE2 -0.09528118666911108 3.36413886621527e-27
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K27me3 -0.28958561139696254 1.0906807671975684e-245
H3K4me3 Log2FC FB -0.4470506488127457 0.0
H3K4me3 Log2FC MB -0.4473702882601094 0.0
H3K4me3 Log2FC HB -0.41979679249095553 0.0
H3K4me3 Log2FC SC -0.3297606127199917 0.0
H3K4me3 VAE0 -0.06585650111025297 8.830832983169405e-14
H3K4me3 VAE1 0.18648158069639809 1.7257177250362483e-100
H3K4me3 VAE2 -0.45745926370705253 0.0
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K27me3 -0.2526689336918533 1.4216280599037781e-185
H3K27ac Log2FC FB -0.3815669720025924 0.0
H3K27ac Log2FC MB -0.42208837018425827 0.0
H3K27ac Log2FC HB -0.408298389874337 0.0
H3K27ac Log2FC SC -0.2977765740809075 2.491982785246384e-260
H3K27ac VAE0 -0.021472303565038334 0.01513753080634104
H3K27ac VAE1 0.16479213573088783 1.3658104535434414e-78
H3K27ac VAE2 -0.41816622635705336 0.0
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K27me3 -0.35415360112947697 0.0
H3K36me3 Log2FC FB -0.4744138412763159 0.0
H3K36me3 Log2FC MB -0.430059873023584 0.0
H3K36me3 Log2FC HB -0.3634108408611482 0.0
H3K36me3 Log2FC SC -0.33209079328572233 0.0
H3K36me3 VAE0 -0.14637831865282763 3.1818613224446687e-62
H3K36me3 VAE1 0.2773544371972295 1.0166011378724836e-224
H3K36me3 VAE2 -0.44625458684523317 0.0
H3K27me3 H3K4me1 0.03880145459733418 1.1304167715365197e-05
H3K27me3 H3K4me2 0.18368591029969353 1.662520462560716e-97
H3K27me3 H3K4me3 -0.2895856113969625 1.0906807671978166e-245
H3K27me3 H3K27ac -0.2526689336918533 1.4216280599037781e-185
H3K27me3 H3K36me3 -0.35415360112947697 0.0
H3K27me3 H3K27me3 1.0 0.0
H3K27me3 Log2FC FB 0.37643342244583206 0.0
H3K27me3 Log2FC MB 0.3225460106810916 1.314030964712288e-307
H3K27me3 Log2FC HB 0.2347875537574898 8.590917791342444e-160
H3K27me3 Log2FC SC 0.2956826706138225 1.5329233866307224e-256
H3K27me3 VAE0 0.5530783713203921 0.0
H3K27me3 VAE1 -0.8554111444358766 0.0
H3K27me3 VAE2 0.3788059166332001 0.0
Log2FC FB H3K4me1 -0.14880590787152698 2.8859404622978633e-64
Log2FC FB H3K4me2 -0.12969526458358954 3.9896551047753745e-49
Log2FC FB H3K4me3 -0.4470506488127457 0.0
Log2FC FB H3K27ac -0.3815669720025924 0.0
Log2FC FB H3K36me3 -0.4744138412763159 0.0
Log2FC FB H3K27me3 0.37643342244583206 0.0
Log2FC FB Log2FC FB 1.0 0.0
Log2FC FB Log2FC MB 0.7040491449224625 0.0
Log2FC FB Log2FC HB 0.5367783316680511 0.0
Log2FC FB Log2FC SC 0.5730464144717174 0.0
Log2FC FB VAE0 0.23386004862667242 1.6353603410522057e-158
Log2FC FB VAE1 -0.42031788136966924 0.0
Log2FC FB VAE2 0.5571965727331442 0.0
Log2FC MB H3K4me1 -0.10387373575786396 4.872008964191265e-32
Log2FC MB H3K4me2 -0.09642120978180409 8.108800676805556e-28
Log2FC MB H3K4me3 -0.44737028826010944 0.0
Log2FC MB H3K27ac -0.4220883701842583 0.0
Log2FC MB H3K36me3 -0.43005987302358406 0.0
Log2FC MB H3K27me3 0.32254601068109157 1.314030964712587e-307
Log2FC MB Log2FC FB 0.7040491449224625 0.0
Log2FC MB Log2FC MB 0.9999999999999999 0.0
Log2FC MB Log2FC HB 0.7578212671301587 0.0
Log2FC MB Log2FC SC 0.5751592030701783 0.0
Log2FC MB VAE0 0.09497872033347349 4.893067037273455e-27
Log2FC MB VAE1 -0.38359407529821415 0.0
Log2FC MB VAE2 0.4076827285688065 0.0
Log2FC HB H3K4me1 -0.05777615219411477 6.12378414825415e-11
Log2FC HB H3K4me2 -0.10550208768149451 5.2879602412044856e-33
Log2FC HB H3K4me3 -0.4197967924909555 0.0
Log2FC HB H3K27ac -0.408298389874337 0.0
Log2FC HB H3K36me3 -0.36341084086114817 0.0
Log2FC HB H3K27me3 0.2347875537574898 8.590917791342444e-160
Log2FC HB Log2FC FB 0.5367783316680511 0.0
Log2FC HB Log2FC MB 0.7578212671301588 0.0
Log2FC HB Log2FC HB 1.0 0.0
Log2FC HB Log2FC SC 0.47172347343211496 0.0
Log2FC HB VAE0 -0.060557993887538075 7.072852121470975e-12
Log2FC HB VAE1 -0.2517816330407703 3.0367592025972104e-184
Log2FC HB VAE2 0.23197909457281732 6.183849194431829e-156
Log2FC SC H3K4me1 -0.07950151137451963 2.1197279496875092e-19
Log2FC SC H3K4me2 -0.08178812465927764 1.9179743858494207e-20
Log2FC SC H3K4me3 -0.3297606127199917 0.0
Log2FC SC H3K27ac -0.2977765740809076 2.4919827852461e-260
Log2FC SC H3K36me3 -0.33209079328572233 0.0
Log2FC SC H3K27me3 0.2956826706138225 1.5329233866307224e-256
Log2FC SC Log2FC FB 0.5730464144717174 0.0
Log2FC SC Log2FC MB 0.5751592030701783 0.0
Log2FC SC Log2FC HB 0.47172347343211496 0.0
Log2FC SC Log2FC SC 0.9999999999999999 0.0
Log2FC SC VAE0 0.06903724913680313 5.353138003220564e-15
Log2FC SC VAE1 -0.35928593051293045 0.0
Log2FC SC VAE2 0.4474914576959328 0.0
VAE0 H3K4me1 -0.013568556295341615 0.12482123994503176
VAE0 H3K4me2 0.18887754682460808 4.3799637480020857e-103
VAE0 H3K4me3 -0.06585650111025299 8.830832983169246e-14
VAE0 H3K27ac -0.021472303565038334 0.01513753080634104
VAE0 H3K36me3 -0.14637831865282763 3.1818613224446687e-62
VAE0 H3K27me3 0.5530783713203921 0.0
VAE0 Log2FC FB 0.23386004862667245 1.6353603410522057e-158
VAE0 Log2FC MB 0.09497872033347349 4.893067037273455e-27
VAE0 Log2FC HB -0.06055799388753807 7.072852121471026e-12
VAE0 Log2FC SC 0.06903724913680313 5.353138003220564e-15
VAE0 VAE0 1.0 0.0
VAE0 VAE1 -0.46110326962849063 0.0
VAE0 VAE2 0.0553254384134554 3.7809955029025667e-10
VAE1 H3K4me1 -0.031975417695767415 0.00029717150125224174
VAE1 H3K4me2 -0.19240476207447962 5.701135438643352e-107
VAE1 H3K4me3 0.18648158069639809 1.7257177250362483e-100
VAE1 H3K27ac 0.16479213573088783 1.3658104535434414e-78
VAE1 H3K36me3 0.2773544371972296 1.0166011378721364e-224
VAE1 H3K27me3 -0.8554111444358766 0.0
VAE1 Log2FC FB -0.42031788136966924 0.0
VAE1 Log2FC MB -0.3835940752982142 0.0
VAE1 Log2FC HB -0.25178163304077034 3.0367592025966925e-184
VAE1 Log2FC SC -0.35928593051293045 0.0
VAE1 VAE0 -0.46110326962849063 0.0
VAE1 VAE1 1.0 0.0
VAE1 VAE2 -0.3076063848742393 1.5155595210118842e-278
VAE2 H3K4me1 -0.07362293623376154 7.491335391145723e-17
VAE2 H3K4me2 -0.09528118666911108 3.36413886621527e-27
VAE2 H3K4me3 -0.4574592637070526 0.0
VAE2 H3K27ac -0.4181662263570533 0.0
VAE2 H3K36me3 -0.44625458684523317 0.0
VAE2 H3K27me3 0.3788059166332001 0.0
VAE2 Log2FC FB 0.5571965727331442 0.0
VAE2 Log2FC MB 0.40768272856880644 0.0
VAE2 Log2FC HB 0.23197909457281732 6.183849194431829e-156
VAE2 Log2FC SC 0.44749145769593274 0.0
VAE2 VAE0 0.0553254384134554 3.7809955029025667e-10
VAE2 VAE1 -0.3076063848742393 1.5155595210118842e-278
VAE2 VAE2 1.0 0.0
<Figure size 216x216 with 0 Axes>
H3K4me1 H3K4me1 1.0 0.0
H3K4me1 H3K4me2 0.39749347776849686 0.0
H3K4me1 H3K4me3 0.28172402945842107 4.3402046596620704e-232
H3K4me1 H3K27ac 0.2362835918111678 7.214904776823545e-162
H3K4me1 H3K36me3 0.22929575895557416 2.6822018034629003e-152
H3K4me1 H3K27me3 0.03880145459733418 1.1304167715365197e-05
H3K4me1 Log2FC FB -0.14880590787152698 2.8859404622978633e-64
H3K4me1 Log2FC MB -0.10387373575786396 4.872008964191265e-32
H3K4me1 Log2FC HB -0.05777615219411477 6.12378414825415e-11
H3K4me1 Log2FC SC -0.07950151137451965 2.1197279496874784e-19
H3K4me1 VAE0 -0.013568556295341615 0.12482123994503176
H3K4me1 VAE1 -0.031975417695767415 0.00029717150125224174
H3K4me1 VAE2 -0.07362293623376154 7.491335391145723e-17
H3K4me2 H3K4me1 0.39749347776849686 0.0
H3K4me2 H3K4me2 1.0 0.0
H3K4me2 H3K4me3 0.46233360809517227 0.0
H3K4me2 H3K27ac 0.2931385611078129 5.576842401477536e-252
H3K4me2 H3K36me3 0.16555036365358755 2.6180050261417907e-79
H3K4me2 H3K27me3 0.1836859102996935 1.6625204625607636e-97
H3K4me2 Log2FC FB -0.12969526458358954 3.9896551047753745e-49
H3K4me2 Log2FC MB -0.09642120978180409 8.108800676805556e-28
H3K4me2 Log2FC HB -0.10550208768149451 5.2879602412044856e-33
H3K4me2 Log2FC SC -0.08178812465927765 1.9179743858493656e-20
H3K4me2 VAE0 0.18887754682460806 4.3799637480023355e-103
H3K4me2 VAE1 -0.1924047620744796 5.701135438644e-107
H3K4me2 VAE2 -0.09528118666911108 3.36413886621527e-27
H3K4me3 H3K4me1 0.281724029458421 4.340204659663059e-232
H3K4me3 H3K4me2 0.46233360809517227 0.0
H3K4me3 H3K4me3 0.9999999999999999 0.0
H3K4me3 H3K27ac 0.7057105100332491 0.0
H3K4me3 H3K36me3 0.5041247938852597 0.0
H3K4me3 H3K27me3 -0.28958561139696254 1.0906807671975684e-245
H3K4me3 Log2FC FB -0.4470506488127457 0.0
H3K4me3 Log2FC MB -0.4473702882601094 0.0
H3K4me3 Log2FC HB -0.41979679249095553 0.0
H3K4me3 Log2FC SC -0.3297606127199917 0.0
H3K4me3 VAE0 -0.06585650111025297 8.830832983169405e-14
H3K4me3 VAE1 0.18648158069639809 1.7257177250362483e-100
H3K4me3 VAE2 -0.45745926370705253 0.0
H3K27ac H3K4me1 0.23628359181116781 7.214904776822724e-162
H3K27ac H3K4me2 0.29313856110781294 5.576842401476902e-252
H3K27ac H3K4me3 0.7057105100332491 0.0
H3K27ac H3K27ac 0.9999999999999999 0.0
H3K27ac H3K36me3 0.43544931623713806 0.0
H3K27ac H3K27me3 -0.2526689336918533 1.4216280599037781e-185
H3K27ac Log2FC FB -0.3815669720025924 0.0
H3K27ac Log2FC MB -0.42208837018425827 0.0
H3K27ac Log2FC HB -0.408298389874337 0.0
H3K27ac Log2FC SC -0.2977765740809075 2.491982785246384e-260
H3K27ac VAE0 -0.021472303565038334 0.01513753080634104
H3K27ac VAE1 0.16479213573088783 1.3658104535434414e-78
H3K27ac VAE2 -0.41816622635705336 0.0
H3K36me3 H3K4me1 0.22929575895557416 2.6822018034629003e-152
H3K36me3 H3K4me2 0.16555036365358758 2.618005026141492e-79
H3K36me3 H3K4me3 0.5041247938852595 0.0
H3K36me3 H3K27ac 0.43544931623713806 0.0
H3K36me3 H3K36me3 1.0 0.0
H3K36me3 H3K27me3 -0.35415360112947697 0.0
H3K36me3 Log2FC FB -0.4744138412763159 0.0
H3K36me3 Log2FC MB -0.430059873023584 0.0
H3K36me3 Log2FC HB -0.3634108408611482 0.0
H3K36me3 Log2FC SC -0.33209079328572233 0.0
H3K36me3 VAE0 -0.14637831865282763 3.1818613224446687e-62
H3K36me3 VAE1 0.2773544371972295 1.0166011378724836e-224
H3K36me3 VAE2 -0.44625458684523317 0.0
H3K27me3 H3K4me1 0.03880145459733418 1.1304167715365197e-05
H3K27me3 H3K4me2 0.18368591029969353 1.662520462560716e-97
H3K27me3 H3K4me3 -0.2895856113969625 1.0906807671978166e-245
H3K27me3 H3K27ac -0.2526689336918533 1.4216280599037781e-185
H3K27me3 H3K36me3 -0.35415360112947697 0.0
H3K27me3 H3K27me3 1.0 0.0
H3K27me3 Log2FC FB 0.37643342244583206 0.0
H3K27me3 Log2FC MB 0.3225460106810916 1.314030964712288e-307
H3K27me3 Log2FC HB 0.2347875537574898 8.590917791342444e-160
H3K27me3 Log2FC SC 0.2956826706138225 1.5329233866307224e-256
H3K27me3 VAE0 0.5530783713203921 0.0
H3K27me3 VAE1 -0.8554111444358766 0.0
H3K27me3 VAE2 0.3788059166332001 0.0
Log2FC FB H3K4me1 -0.14880590787152698 2.8859404622978633e-64
Log2FC FB H3K4me2 -0.12969526458358954 3.9896551047753745e-49
Log2FC FB H3K4me3 -0.4470506488127457 0.0
Log2FC FB H3K27ac -0.3815669720025924 0.0
Log2FC FB H3K36me3 -0.4744138412763159 0.0
Log2FC FB H3K27me3 0.37643342244583206 0.0
Log2FC FB Log2FC FB 1.0 0.0
Log2FC FB Log2FC MB 0.7040491449224625 0.0
Log2FC FB Log2FC HB 0.5367783316680511 0.0
Log2FC FB Log2FC SC 0.5730464144717174 0.0
Log2FC FB VAE0 0.23386004862667242 1.6353603410522057e-158
Log2FC FB VAE1 -0.42031788136966924 0.0
Log2FC FB VAE2 0.5571965727331442 0.0
Log2FC MB H3K4me1 -0.10387373575786396 4.872008964191265e-32
Log2FC MB H3K4me2 -0.09642120978180409 8.108800676805556e-28
Log2FC MB H3K4me3 -0.44737028826010944 0.0
Log2FC MB H3K27ac -0.4220883701842583 0.0
Log2FC MB H3K36me3 -0.43005987302358406 0.0
Log2FC MB H3K27me3 0.32254601068109157 1.314030964712587e-307
Log2FC MB Log2FC FB 0.7040491449224625 0.0
Log2FC MB Log2FC MB 0.9999999999999999 0.0
Log2FC MB Log2FC HB 0.7578212671301587 0.0
Log2FC MB Log2FC SC 0.5751592030701783 0.0
Log2FC MB VAE0 0.09497872033347349 4.893067037273455e-27
Log2FC MB VAE1 -0.38359407529821415 0.0
Log2FC MB VAE2 0.4076827285688065 0.0
Log2FC HB H3K4me1 -0.05777615219411477 6.12378414825415e-11
Log2FC HB H3K4me2 -0.10550208768149451 5.2879602412044856e-33
Log2FC HB H3K4me3 -0.4197967924909555 0.0
Log2FC HB H3K27ac -0.408298389874337 0.0
Log2FC HB H3K36me3 -0.36341084086114817 0.0
Log2FC HB H3K27me3 0.2347875537574898 8.590917791342444e-160
Log2FC HB Log2FC FB 0.5367783316680511 0.0
Log2FC HB Log2FC MB 0.7578212671301588 0.0
Log2FC HB Log2FC HB 1.0 0.0
Log2FC HB Log2FC SC 0.47172347343211496 0.0
Log2FC HB VAE0 -0.060557993887538075 7.072852121470975e-12
Log2FC HB VAE1 -0.2517816330407703 3.0367592025972104e-184
Log2FC HB VAE2 0.23197909457281732 6.183849194431829e-156
Log2FC SC H3K4me1 -0.07950151137451963 2.1197279496875092e-19
Log2FC SC H3K4me2 -0.08178812465927764 1.9179743858494207e-20
Log2FC SC H3K4me3 -0.3297606127199917 0.0
Log2FC SC H3K27ac -0.2977765740809076 2.4919827852461e-260
Log2FC SC H3K36me3 -0.33209079328572233 0.0
Log2FC SC H3K27me3 0.2956826706138225 1.5329233866307224e-256
Log2FC SC Log2FC FB 0.5730464144717174 0.0
Log2FC SC Log2FC MB 0.5751592030701783 0.0
Log2FC SC Log2FC HB 0.47172347343211496 0.0
Log2FC SC Log2FC SC 0.9999999999999999 0.0
Log2FC SC VAE0 0.06903724913680313 5.353138003220564e-15
Log2FC SC VAE1 -0.35928593051293045 0.0
Log2FC SC VAE2 0.4474914576959328 0.0
VAE0 H3K4me1 -0.013568556295341615 0.12482123994503176
VAE0 H3K4me2 0.18887754682460808 4.3799637480020857e-103
VAE0 H3K4me3 -0.06585650111025299 8.830832983169246e-14
VAE0 H3K27ac -0.021472303565038334 0.01513753080634104
VAE0 H3K36me3 -0.14637831865282763 3.1818613224446687e-62
VAE0 H3K27me3 0.5530783713203921 0.0
VAE0 Log2FC FB 0.23386004862667245 1.6353603410522057e-158
VAE0 Log2FC MB 0.09497872033347349 4.893067037273455e-27
VAE0 Log2FC HB -0.06055799388753807 7.072852121471026e-12
VAE0 Log2FC SC 0.06903724913680313 5.353138003220564e-15
VAE0 VAE0 1.0 0.0
VAE0 VAE1 -0.46110326962849063 0.0
VAE0 VAE2 0.0553254384134554 3.7809955029025667e-10
VAE1 H3K4me1 -0.031975417695767415 0.00029717150125224174
VAE1 H3K4me2 -0.19240476207447962 5.701135438643352e-107
VAE1 H3K4me3 0.18648158069639809 1.7257177250362483e-100
VAE1 H3K27ac 0.16479213573088783 1.3658104535434414e-78
VAE1 H3K36me3 0.2773544371972296 1.0166011378721364e-224
VAE1 H3K27me3 -0.8554111444358766 0.0
VAE1 Log2FC FB -0.42031788136966924 0.0
VAE1 Log2FC MB -0.3835940752982142 0.0
VAE1 Log2FC HB -0.25178163304077034 3.0367592025966925e-184
VAE1 Log2FC SC -0.35928593051293045 0.0
VAE1 VAE0 -0.46110326962849063 0.0
VAE1 VAE1 1.0 0.0
VAE1 VAE2 -0.3076063848742393 1.5155595210118842e-278
VAE2 H3K4me1 -0.07362293623376154 7.491335391145723e-17
VAE2 H3K4me2 -0.09528118666911108 3.36413886621527e-27
VAE2 H3K4me3 -0.4574592637070526 0.0
VAE2 H3K27ac -0.4181662263570533 0.0
VAE2 H3K36me3 -0.44625458684523317 0.0
VAE2 H3K27me3 0.3788059166332001 0.0
VAE2 Log2FC FB 0.5571965727331442 0.0
VAE2 Log2FC MB 0.40768272856880644 0.0
VAE2 Log2FC HB 0.23197909457281732 6.183849194431829e-156
VAE2 Log2FC SC 0.44749145769593274 0.0
VAE2 VAE0 0.0553254384134554 3.7809955029025667e-10
VAE2 VAE1 -0.3076063848742393 1.5155595210118842e-278
VAE2 VAE2 1.0 0.0
<Figure size 216x216 with 0 Axes>
  external_gene_name  wt11fb_merged-rep  wt13fb_merged-rep  wt15fb_merged-rep  \
0               Pax2           2.002935           0.805872           0.687880   
1              Hoxb9           0.479086           0.220758           0.272247   
2              Hoxc9           0.070489           0.020139           0.114239   
3              Hoxd9           0.018483           0.058725           0.189060   

   wt18fb_merged-rep  wt11mb_merged-rep  wt13mb_merged-rep  wt15mb_merged-rep  \
0           0.319063           2.417627           3.253193           3.635322   
1           0.172209           0.316455           0.084808           0.145274   
2           0.111092           0.071978           0.022155           0.032423   
3           0.075711           0.090560           0.000000           0.148719   

   wt18mb_merged-rep  wt11hb_merged-rep  wt13hb_merged-rep  wt15hb_merged-rep  \
0           3.593899           5.158974           7.442453           6.735870   
1           0.222129           0.583028           1.544333           2.252819   
2           0.016071           0.118288           0.018302           0.081508   
3           0.031184           0.035835           0.071966           0.072328   

   wt18hb_merged-rep  wt11sc_merged-rep  wt13sc_merged-rep  wt15sc_merged-rep  \
0           6.124097           4.730448           7.405267           6.410930   
1           3.759467           8.786930           9.736304           8.394440   
2           1.539684           5.871115           6.350094           5.333934   
3           0.048047           5.252176           3.308305           5.315772   

   wt18sc_merged-rep  
0           6.355501  
1           8.328319  
2           5.571739  
3           5.567879  
  external_gene_name  ko11fb_merged-rep  ko13fb_merged-rep  ko15fb_merged-rep  \
0               Pax2           3.108827           5.765663           5.404836   
1              Hoxb9           1.027615           3.872195           2.840668   
2              Hoxc9           1.703283           6.086356           5.200582   
3              Hoxd9           1.600412           5.909166           4.968913   

   ko18fb_merged-rep  ko11mb_merged-rep  ko13mb_merged-rep  ko15mb_merged-rep  \
0           4.963471           3.909758           6.262265           5.467721   
1           3.095592           2.442091           4.576879           2.964123   
2           4.578695           2.760883           5.691054           4.920412   
3           4.652042           2.412880           6.038424           4.916205   

   ko18mb_merged-rep  ko11hb_merged-rep  ko13hb_merged-rep  ko15hb_merged-rep  \
0           4.525031           4.210750           6.481735           5.950515   
1           2.827947           2.375786           6.178522           3.968796   
2           4.175629           2.662632           5.024299           4.750092   
3           4.574977           2.258272           5.722458           5.016718   

   ko18hb_merged-rep  ko11sc_merged-rep  ko13sc_merged-rep  ko15sc_merged-rep  \
0           5.205509           4.984483           6.903416           6.332971   
1           4.295223           9.149745           8.563543           7.179321   
2           4.168916           6.278640           5.842700           5.185208   
3           4.585869           5.649826           6.279059           5.465261   

   ko18sc_merged-rep  
0           5.704444  
1           6.969096  
2           5.005286  
3           5.319954  
  external_gene_name  wt11fb_merged-rep  wt13fb_merged-rep  wt15fb_merged-rep  \
0               Otx2           5.758462           5.531050           4.405259   
1                En2           0.494674           0.168652           0.353709   
2             Phox2b           0.102214           0.132168           0.119700   
3              Hoxd3           0.164494           0.133004           0.149337   

   wt18fb_merged-rep  wt11mb_merged-rep  wt13mb_merged-rep  wt15mb_merged-rep  \
0           3.893296           7.722552           7.356560           6.650007   
1           0.413756           7.499362           8.031306           7.013888   
2           0.015052           2.805449           3.955419           3.151693   
3           0.111092           0.140517           0.175505           1.068782   

   wt18mb_merged-rep  wt11hb_merged-rep  wt13hb_merged-rep  wt15hb_merged-rep  \
0           5.799004           3.708020           1.019738           0.976341   
1           6.668011           6.872836           1.465594           0.375820   
2           2.330060           6.469630           7.075044           6.013573   
3           0.123280           5.589150           8.062120           7.073398   

   wt18hb_merged-rep  wt11sc_merged-rep  wt13sc_merged-rep  wt15sc_merged-rep  \
0           4.221625           0.527910           0.036119           0.063529   
1           0.983470           0.548630           0.247523           0.205953   
2           5.348831           3.407077           1.318731           0.177374   
3           6.354484           6.996139           7.274181           5.681410   

   wt18sc_merged-rep  
0           0.079962  
1           0.233611  
2           0.032084  
3           5.317846  
  external_gene_name  ko11fb_merged-rep  ko13fb_merged-rep  ko15fb_merged-rep  \
0               Otx2           7.054284           5.931086           5.888406   
1                En2           4.821768           5.241948           4.639493   
2             Phox2b           1.599360           1.065941           0.572130   
3              Hoxd3           1.231702           5.185332           4.399199   

   ko18fb_merged-rep  ko11mb_merged-rep  ko13mb_merged-rep  ko15mb_merged-rep  \
0           5.319730           5.748901           5.884490           5.933551   
1           4.450940           6.970253           7.608890           6.280874   
2           0.214009           4.499223           3.635362           1.911110   
3           3.833791           3.028335           5.972110           4.999986   

   ko18mb_merged-rep  ko11hb_merged-rep  ko13hb_merged-rep  ko15hb_merged-rep  \
0           5.312715           5.090304           4.275430           4.738128   
1           6.268489           4.803762           5.565673           6.119783   
2           2.076850           3.455354           5.766164           4.587203   
3           3.755855           3.310889           5.867555           5.133170   

   ko18hb_merged-rep  ko11sc_merged-rep  ko13sc_merged-rep  ko15sc_merged-rep  \
0           3.662862           0.820287           2.904100           2.846001   
1           4.860775           3.372272           5.201905           4.665178   
2           5.165144           2.972264           1.325385           1.776973   
3           4.737131           7.106383           6.408114           5.623793   

   ko18sc_merged-rep  
0           2.294013  
1           4.312455  
2           0.466172  
3           5.027903  
Out[12]:
<Axes3DSubplot:xlabel='Node 1', ylabel='Node 2'>
<Figure size 360x360 with 0 Axes>
In [13]:
""" Print out the gene lists. """

gene_markers_sep = [['Emx1', 'Eomes', 'Tbr1', 'Foxg1', 'Lhx6'], 
                    ['En1', 'En2', 'Lmx1a', 'Bhlhe23', 'Sall4'], 
                    ['Hoxb1', 'Krox20', 'Fev', 'Hoxd3', 'Phox2b'],
                    ['Hoxd8', 'Hoxd9', 'Hoxd10', 'Hoxd11', 'Hoxd12', 'Hoxd13', 'Hoxa7', 'Hoxa9', 'Hoxa10', 'Hoxa11', 
                    'Hoxa13', 'Hoxb9', 'Hoxb13',  'Hoxc8', 'Hoxc9', 'Hoxc10', 'Hoxc11', 'Hoxc12', 'Hoxc13'],
                    ['Ccna1', 'Ccna2', 'Ccnd1', 'Ccnd2', 'Ccnd3', 'Ccne1', 'Ccne2', 'Cdc25a', 
                    'Cdc25b', 'Cdc25c', 'E2f1', 'E2f2', 'E2f3', 'Mcm10', 'Mcm5', 'Mcm3', 'Mcm2', 'Cip2a'],
                    ['Cdkn1a', 'Cdkn1b', 'Cdkn1c', 'Cdkn2a', 'Cdkn2b', 'Cdkn2c', 'Cdkn2d'],
                    ['Sox2', 'Sox1', 'Sox3', 'Hes1', 'Hes5'],
                    ['Snap25', 'Syt1', 'Slc32a1','Slc17a6', 'Syn1'],
                    ['Cspg4', 'Aqp4', 'Slc6a11', 'Olig1', 'Igfbp3'],
                    ['Foxg1'], 
                    ['En2'], 
                    ['Phox2b'],
                    ['Hoxc9'],
                    ['Sox3']
                    ]

marker_labels_sep = ['forebrain', 'midbrain', 'hindbrain',  'spinalcord', 
                     'Proliferation', 'Negative regulators of Cell Cycle', 
                    'progenitors', 'neurons', 'glia',
                     'Foxg1', 'En2', 'Phox2b', 'Hoxc9', 'Sox3'
                    ]
# Print genes that were actually in our dataset 
cx = [g for g in df[gene_name].values if g in ['Hoxd8', 'Hoxd9', 'Hoxd10', 'Hoxd11', 'Hoxd12', 'Hoxd13', 'Hoxa7', 'Hoxa9', 'Hoxa10', 'Hoxa11', 
                    'Hoxa13', 'Hoxb9', 'Hoxb13',  'Hoxc8', 'Hoxc9', 'Hoxc10', 'Hoxc11', 'Hoxc12', 'Hoxc13']]
print(', '.join(cx))

len(cx)
cx = [g for g in df[gene_name].values if g in ['Sox2', 'Sox1', 'Sox3', 'Hes1', 'Hes5']]
print(', '.join(cx))
cx = [g for g in df[gene_name].values if g in ['Snap25', 'Syt1', 'Slc32a1','Slc17a6', 'Syn1']]
print(', '.join(cx))
cx = [g for g in df[gene_name].values if g in['Cspg4', 'Aqp4', 'Slc6a11', 'Olig1', 'Igfbp3']]
print(', '.join(cx))
prolif = ['Ccna1', 'Ccna2', 'Ccnd1', 'Ccnd2', 'Ccnd3', 'Ccne1', 'Ccne2', 'Cdc25a', 'Cdc25b', 'Cdc25c', 'E2f1', 'E2f2', 'E2f3', 'Mcm10', 'Mcm5', 'Mcm3', 'Mcm2', 'Cip2a']
anti_prolif = ['Cdkn1a', 'Cdkn1b', 'Cdkn1c', 'Cdkn2a', 'Cdkn2b', 'Cdkn2c', 'Cdkn2d']
pl = [g for g in df[gene_name].values if g in prolif]
apl = [g for g in df[gene_name].values if g in anti_prolif]
print(', '.join(pl))
print(', '.join(apl))


# Reset the vae data 
vae_data = all_vae_data
Hoxb13, Hoxb9, Hoxc13, Hoxc12, Hoxc11, Hoxc10, Hoxc9, Hoxc8, Hoxd13, Hoxd11, Hoxd10, Hoxd9, Hoxd8, Hoxa7, Hoxa9, Hoxa10, Hoxa11, Hoxa13
Hes1, Sox2, Hes5, Sox1, Sox3
Syt1, Snap25, Slc32a1, Slc17a6, Syn1
Igfbp3, Olig1, Aqp4, Slc6a11, Cspg4
Mcm3, E2f3, Cip2a, Ccnd3, Cdc25c, Mcm10, Cdc25b, E2f1, Ccna2, Ccna1, Ccne2, E2f2, Mcm2, Ccnd2, Ccne1, Ccnd1, Mcm5, Cdc25a
Cdkn1a, Cdkn2a, Cdkn2b, Cdkn2c, Cdkn1b, Cdkn1c, Cdkn2d

6) Save ranks for GSEA

We perform GSEA on the ranks of the VAE.

In [15]:
# -----------------------------------------------------------------------------------
#                         Save genes sorted by latent node (GSEA)
# -----------------------------------------------------------------------------------
for n in range(0, num_nodes):
    with open(f'{ora_dir}vae{n}_genes_{experiment_name}_{date}.csv', 'w+') as f:
        f.write(gene_id + ',value\n')
        desc_sorted = (-vae_data[:,n]).argsort()  # Sort the genes by descending order
        genes = df[gene_id].values[desc_sorted]
        vae_data_sorted = vae_data[:,n][desc_sorted]
        i = 0
        for g in genes:
            f.write(f'{g},{vae_data_sorted[i]}\n')
            i += 1
            

# -----------------------------------------------------------------------------------
#                         Save genes sorted by latent node (GSEA)
# -----------------------------------------------------------------------------------
for n in range(0, num_nodes):
    with open(f'{ora_dir}vae{n}_gene-names_{experiment_name}_{date}.csv', 'w+') as f:
        f.write(gene_name + ',value\n')
        desc_sorted = (-vae_data[:,n]).argsort()  # Sort the genes by descending order
        genes = df[gene_name].values[desc_sorted]
        vae_data_sorted = vae_data[:,n][desc_sorted]
        i = 0
        for g in genes:
            f.write(f'{g},{vae_data_sorted[i]}\n')
            i += 1

7) Compute clusters driving VAE

In the next section, we use information about the VAE nodes to compute clusters regarding the latent space.

In [17]:
def get_q1_q3(node_idx):
    iqr_val = 0.95 * stats.iqr(vae_data[:, node_idx])
    q1_genes_idxs = np.where(vae_data[:, node_idx] <= -1.25)[0] # (np.mean(vae_data[:, node_idx]) - iqr_val))[0]
    q3_genes_idxs = np.where(vae_data[:, node_idx] >= 1.25)[0] #(np.mean(vae_data[:, node_idx]) + iqr_val))[0]
    return q1_genes_idxs, q3_genes_idxs

# -----------------------------------------------------------------------------------
#                         Find the genes driving the latent space
# -----------------------------------------------------------------------------------

n_clusters = 6
# Get the indexs for each of the q1 and q3 for each node
q1_n0_idxs, q3_n0_idxs = get_q1_q3(0)
q1_n1_idxs, q3_n1_idxs = get_q1_q3(1)
q1_n2_idxs, q3_n2_idxs = get_q1_q3(2)

# Create a list of the indexs
vae_set_idxs = [
    q1_n0_idxs, q3_n0_idxs, 
    q1_n1_idxs, q3_n1_idxs, 
    q1_n2_idxs, q3_n2_idxs
]

vae_set_labels = ['Set 1', 'Set 2', 'Set 3', 'Set 4', 'Set 5', 'Set 6']

# Get all the driver and non-driver idxs
non_driver_idxs = []
driver_idxs = []
for i, ids in enumerate(vae_set_idxs):
    vae_mse.u.dp([vae_set_labels[i], len(ids)])
    driver_idxs += list(ids)
    
for i in range(0, len(df)):
    if i not in driver_idxs:
        non_driver_idxs.append(i)
# -----------------------------------------------------------------------------------
#                         Plot a VENN of how the genes in teh clusters overlap
# -----------------------------------------------------------------------------------

gene_sets = [[], [], [], [], [], []]

for i, g in enumerate(df[gene_name].values):
    ci = 0
    for gene_set in vae_set_idxs:
        for j in gene_set:
            if i == j:
                gene_sets[ci].append(g)
        ci += 1

set_sets = []
for g in gene_sets:  
    if len(g) > 1:
        set_sets.append(set(g))

set_labels = venn.get_labels(set_sets)
vae_set_labels_l = [s.replace('Set', 'Group') for s in vae_set_labels]
vae_set_genes_len_dict = {}
vae_set_genes_dict = {}
for i, l in enumerate(vae_set_labels):
    vae_set_genes_dict[l] = gene_sets[i]
    vae_set_genes_len_dict[l] = len(gene_sets[i])

venn.venn6(set_labels, names=vae_set_labels_l)
save_fig('gene_sets.svg')
plt.show()


vae_set_genes_as_list = []
for set_name in vae_set_labels:
    vae_set_genes_as_list.append(vae_set_genes_dict.get(set_name))

sorted_sets_by_size = {k: v for k, v in sorted(vae_set_genes_len_dict.items(), key=lambda item: item[1])}
gene_set_labels_unique = []
for g in df[gene_name].values:
    found = False
    for label, values in sorted_sets_by_size.items():
        gene_group = vae_set_genes_dict[label]
        for g_l in gene_group:
            if g_l == g:
                gene_set_labels_unique.append(label)
                found = True
                break
        if found:
            break
    if not found:
        gene_set_labels_unique.append(None)
df['GeneDriverSet'] =  gene_set_labels_unique

# We also want to add each of the gene sets
gene_labels = [[], [], [], [], [], []]
for g in df[gene_name].values:
    for i, label in enumerate(vae_set_labels):
        found = False
        gene_group = vae_set_genes_dict[label]
        for g_l in gene_group:
            if g == g_l:
                gene_labels[i].append(True)
                found = True
                break
        if not found:
            gene_labels[i].append(False)
for i, label in enumerate(vae_set_labels):
    df[label] = gene_labels[i]
    
            
# -----------------------------------------------------------------------------------
#                         Plot the genes on a scatter plot
# -----------------------------------------------------------------------------------
vae_vis.plot_values_on_scatters(df, gene_name, vae_set_labels,
                            vae_set_genes_as_list, vae_data=vae_data, output_dir=fig_dir, plt_bg=True,
                            title=f'VAE gene driver sets {experiment_name}',
                            show_plt=True, save_fig=True)

# -----------------------------------------------------------------------------------
#                         Plot histograms of the VAE nodes with cutoffs used above
# -----------------------------------------------------------------------------------
for n in range(0, num_nodes):
    x = vae_data[:,n]
    iqr_val = 1.0 * stats.iqr(x)
    plt.hist(vae_data[:,n], bins=20, color='grey')
    plt.ylim(0, 380)
    plt.axvline(x.mean() - iqr_val, color='k', linestyle='dashed', linewidth=1)
    plt.axvline(x.mean() + iqr_val, color='r', linestyle='dashed', linewidth=1)
    save_fig(f'hist-{n}')
    plt.show()
--------------------------------------------------------------------------------
                                   Set 1	288	                                   
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                                  Set 2	2175	                                   
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                                  Set 3	1484	                                   
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                                   Set 4	205	                                   
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                                   Set 5	322	                                   
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                                  Set 6	1748	                                   
--------------------------------------------------------------------------------
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/venn/_backwards_compatibility.py:15: UserWarning: `get_labels()` is retained for backwards compatibility; use `generate_petal_labels()` or the higher level `venn()` instead
  warn((
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/venn/_backwards_compatibility.py:30: UserWarning: `venn6()` is retained for backwards compatibility; use `venn()` instead
  warn((
--------------------------------------------------------------------------------
plot_scatters	You have more than three latent nodes: 	6	
 We will only be plotting the first three	
--------------------------------------------------------------------------------
<Figure size 108x108 with 0 Axes>
In [18]:
hox_genes = sc_genes
forebrain_genes = fb_genes
h3cols = []
fb_rna_cols = []
sc_rna_cols = []

# Do it in this way so they are correctly ordered
for c in df.columns:
    if 'H3K27me' in c and 'signal' in c:
        h3cols.append(c)
    elif 'wt' in c:
        if 'fb' in c:
            fb_rna_cols.append(c)
        if 'sc' in c:
            sc_rna_cols.append(c)
for c in df.columns:
    if 'ko' in c:
        if 'fb' in c:
            fb_rna_cols.append(c)
        if 'sc' in c:
            sc_rna_cols.append(c)

def plot_gene_boxplot(df, title, cluster_id, cols, idxs):
    idxs = idxs[cluster_id]
    boxplot = Boxplot(df, gene_name, cols[0])
    box_df = boxplot.format_data_for_boxplot(df, cols, gene_name, df[gene_name].values[idxs])
    is_hox = []
    sns.set_style("white")
    for c in box_df['Samples'].values:
        if 'Hox' in c:
            is_hox.append('Hox')
        else:
            is_hox.append('Hox like')
    box_df['is_hox'] = is_hox

    boxplot = Boxplot(box_df, "Conditions", "Values", add_stats=False, add_dots=False, figsize=(1,0.5),
                       order=cols)
    boxplot.palette = sci_colour

    ax = boxplot.plot()
    plt.title(title)
    ax.set_ylim(0, 12)
    sns.set_style("white")
    c = 0
    for b in ax.artists:
        if c < len(cols)/2:
            b.set_facecolor(wt_colour)
        else:
            b.set_facecolor(ko_colour)
        c += 1
    save_fig(f'{title}')
    
    plt.show()

avgs_fb = [['wt11fb1',
         'wt11fb2'],
         ['wt13fb1',
         'wt13fb2'],
         ['wt15fb1',
         'wt15fb2'],
         ['wt18fb1',
         'wt18fb2'],
         ['ko11fb1',
         'ko11fb2'],
         ['ko13fb1',
         'ko13fb2'],
         ['ko15fb1',
         'ko15fb2'],
         ['ko18fb1',
         'ko18fb2']]

avgs_sc = [['wt11sc1',
         'wt11sc2'],
         ['wt13sc1',
         'wt13sc2'],
         ['wt15sc1',
         'wt15sc2'],
         ['wt18sc1',
         'wt18sc2'],
         ['ko11sc1',
         'ko11sc2'],
         ['ko13sc1',
         'ko13sc2'],
         ['ko15sc1',
         'ko15sc2'],
         ['ko18sc1',
         'ko18sc2']]

avgs_hb = [['wt11hb1',
         'wt11hb2'],
         ['wt13hb1',
         'wt13hb2'],
         ['wt15hb1',
         'wt15hb2'],
         ['wt18hb1',
         'wt18hb2'],
         ['ko11hb1',
         'ko11hb2'],
         ['ko13hb1',
         'ko13hb2'],
         ['ko15hb1',
         'ko15hb2'],
         ['ko18hb1',
         'ko18hb2']]

avgs_mb = [['wt11mb1',
         'wt11mb2'],
         ['wt13mb1',
         'wt13mb2'],
         ['wt15mb1',
         'wt15mb2'],
         ['wt18mb1',
         'wt18mb2'],
         ['ko11mb1',
         'ko11mb2'],
         ['ko13mb1',
         'ko13mb2'],
         ['ko15mb1',
         'ko15mb2'],
         ['ko18mb1',
         'ko18mb2']]
avgs_df = pd.DataFrame()
avgs_df[gene_name] = df[gene_name].values
fb_cols = []
for f in avgs_fb:
    new_col = f'{f[0][:2]} {f[0][2:4]} FB'
    avgs_df[new_col] = (df[f[0]].values + df[f[1]].values) / 2.0
    fb_cols.append(new_col)
    
sc_cols = []
for f in avgs_sc:
    new_col = f'{f[0][:2]} {f[0][2:4]} SC'
    avgs_df[new_col] = (df[f[0]].values + df[f[1]].values) / 2.0
    sc_cols.append(new_col)
    
mb_cols = []
for f in avgs_mb:
    new_col = f'{f[0][:2]} {f[0][2:4]} MB'
    avgs_df[new_col] = (df[f[0]].values + df[f[1]].values) / 2.0
    mb_cols.append(new_col)
    
hb_cols = []
for f in avgs_hb:
    new_col = f'{f[0][:2]} {f[0][2:4]} HB'
    avgs_df[new_col] = (df[f[0]].values + df[f[1]].values) / 2.0
    hb_cols.append(new_col)
    
for i, gs in enumerate(vae_set_idxs):
    plot_gene_boxplot(avgs_df, f'Cluster {i + 1} FB', i, fb_cols, vae_set_idxs)
    plot_gene_boxplot(avgs_df, f'Cluster {i + 1} MB', i, mb_cols, vae_set_idxs)
    plot_gene_boxplot(avgs_df, f'Cluster {i + 1} HB', i, hb_cols, vae_set_idxs)
    plot_gene_boxplot(avgs_df, f'Cluster {i + 1} SC', i, sc_cols, vae_set_idxs)
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.

Plot the heatmaps

In [19]:
def plot_vae_rna_cols(vis_df, cols, num_nodes, fb_logfc, mb_logfc, hb_logfc, sc_logfc, 
                      h3k27me3_fb_e11, h3k27me3_fb_e18, h3k27me3_hb_e11, h3k27me3_hb_e18, title='Heatmap', 
                      num_values=10):
    vae_cols = [f'VAE{i}' for i in range(0, num_nodes)]

    sns.set_style("ticks")
    for r_i, r_c in enumerate(cols):
        for direction in ['up', 'down']:
            # First add the bottom ones
            fig, ax = plt.subplots()
            sns.set(rc={'figure.figsize': (3.5, 2), 'font.family': 'sans-serif',
            'font.sans-serif': 'Arial', 'font.size': 6}, style="ticks")
            rcm_df_sorted = vis_df.sort_values(by=[r_c])
            if direction == 'up':
                rcm_df_tails = rcm_df_sorted.nlargest(num_values, r_c)
            else:
                rcm_df_tails = rcm_df_sorted.nsmallest(num_values, r_c)
            # Add the smallest and the largest
            # first heatmap
            N = len(rcm_df_tails)
            ax.set_xlim(-0.5, 7.5)
            ax.set_xticks([0, 1, 2, 3, 4, 5, 6, 7])
            ax.set_xticklabels(['FB', 'MB', 'HB', 'SC', 
                                'FB e11.5', 'FB e18.5', 'HB e11.5', 'HB e18'])
            ax.set_yticks(range(N))
            ax.set_yticklabels(list(rcm_df_tails[gene_name].values))
            ax.set_ylabel('Genes')

            max_hk3 = 35
            max_rna = 10
            min_rna = -10
            cmap_rna = 'seismic'
            cmap_hk3 = 'Greens'
            im1 = ax.imshow(np.vstack([rcm_df_tails[fb_logfc], rcm_df_tails[fb_logfc]]).T, 
                            aspect='auto',
                            extent=[-0.5, 0.5, -0.5, N - 0.5], vmin=min_rna, vmax=max_rna,
                            origin='lower', cmap=cmap_rna)
            im1 = ax.imshow(np.vstack([rcm_df_tails[mb_logfc], rcm_df_tails[mb_logfc]]).T, 
                            aspect='auto',
                            extent=[0.5, 1.5, -0.5, N - 0.5], vmin=min_rna, vmax=max_rna,
                            origin='lower', cmap=cmap_rna)
            im1 = ax.imshow(np.vstack([rcm_df_tails[hb_logfc], rcm_df_tails[hb_logfc]]).T, 
                aspect='auto',
                extent=[1.5, 2.5, -0.5, N - 0.5], vmin=min_rna, vmax=max_rna,
                origin='lower', cmap=cmap_rna)
            # Now add in the H3K27me3 ones
            im1 = ax.imshow(np.vstack([rcm_df_tails[sc_logfc], rcm_df_tails[sc_logfc]]).T, 
                aspect='auto',
                extent=[2.5, 3.5, -0.5, N - 0.5], vmin=min_rna, vmax=max_rna,
                origin='lower', cmap=cmap_rna)

            im3 = ax.imshow(np.vstack([rcm_df_tails[h3k27me3_fb_e11], rcm_df_tails[h3k27me3_fb_e11]]).T, 
                            aspect='auto',
                            extent=[3.5, 4.5, -0.5, N - 0.5], vmin=0, vmax=max_hk3,
                            origin='lower', cmap=cmap_hk3)

            im3 = ax.imshow(np.vstack([rcm_df_tails[h3k27me3_fb_e18], rcm_df_tails[h3k27me3_fb_e18]]).T, 
                aspect='auto',
                extent=[4.5, 5.5, -0.5, N - 0.5], vmin=0, vmax=max_hk3,
                origin='lower', cmap=cmap_hk3)

            im3 = ax.imshow(np.vstack([rcm_df_tails[h3k27me3_hb_e11], rcm_df_tails[h3k27me3_hb_e11]]).T, 
                            aspect='auto',
                            extent=[5.5, 6.5, -0.5, N - 0.5], vmin=0, vmax=max_hk3,
                            origin='lower', cmap=cmap_hk3)

            im3 = ax.imshow(np.vstack([rcm_df_tails[h3k27me3_hb_e18], rcm_df_tails[h3k27me3_hb_e18]]).T, 
                aspect='auto',
                extent=[6.5, 7.5, -0.5, N - 0.5], vmin=0, vmax=max_hk3,
                origin='lower', cmap=cmap_hk3)

            cbar1 = fig.colorbar(im1, ax=ax, label='RNA logFC')
            cbar2 = fig.colorbar(im3, ax=ax, label='H3K27me3 signal')

            fig.tight_layout()
            plt.xticks(rotation=45, horizontalalignment='right')
            plt.title(f'{title} {r_c}')
            save_fig(f'{title.replace(" ", "_")}_{direction}_{r_c}')
In [20]:
h3k27me3_fb_e11 = [c for c in df.columns if '10.5' in c and 'forebrain' in c and 'H3K27me3' in c and 'signal' in c and 'median' not in c][0]
h3k27me3_fb_e18 = [c for c in df.columns if '16.5' in c and 'forebrain' in c and 'H3K27me3' in c and 'signal' in c and 'median' not in c][0]

h3k27me3_hb_e11 = [c for c in df.columns if '10.5' in c and 'hindbrain' in c and 'H3K27me3' in c and 'signal' in c and 'median' not in c][0]
h3k27me3_hb_e18 = [c for c in df.columns if '16.5' in c and 'hindbrain' in c and 'H3K27me3' in c and 'signal' in c and 'median' not in c][0]

plot_vae_rna_cols(df, ["VAE0", "VAE1", "VAE2"], 3,     
                    'Log2FC FB',
                    'Log2FC MB',
                    'Log2FC HB',
                    'Log2FC SC', 
                     h3k27me3_fb_e11, h3k27me3_fb_e18, h3k27me3_hb_e11, h3k27me3_hb_e18)
<ipython-input-19-741904c72e35>:75: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  fig.tight_layout()
In [21]:
# -----------------------------------------------------------------------------------
#                         Save background genes (ORA)
# -----------------------------------------------------------------------------------
n_clusters = num_nodes
with open(f'{ora_dir}background_genes_{experiment_name}_{date}.csv', 'w+') as f:
    genes = df_all[gene_id].values
    f.write(gene_id + '\n')
    for g in genes:
        f.write(f'{g}\n')
        
# -----------------------------------------------------------------------------------
#                         Save training genes (sig genes) (ORA)
# -----------------------------------------------------------------------------------
with open(f'{ora_dir}training-df_genes_{experiment_name}_{date}.csv', 'w+') as f:
    genes = df_training[gene_id].values
    f.write(gene_id + '\n')
    for g in genes:
        f.write(f'{g}\n')
        
# -----------------------------------------------------------------------------------
#                         Save genes in each of the clusters we annotated (ORA)
# -----------------------------------------------------------------------------------
for i in range(0, n_clusters):
    with open(f'{ora_dir}cluster_{i}_genes_{experiment_name}_{date}.csv', 'w+') as f:
        genes = df[gene_id].values[vae_set_idxs[i]]
        f.write(gene_id + '\n')
        for g in genes:
            f.write(f'{g}\n')
    
# -----------------------------------------------------------------------------------
#                         Save genes sorted by latent node (GSEA) and only the top
# -----------------------------------------------------------------------------------
def plot_top_vae_genes(vae_data_sorted, gene_ids_sorted, gene_names_sorted, label="", num=20):
        i = 0
        gs = []
        for g in gene_names_sorted:
            if g != "0":
                f.write(f'{g},{vae_data_sorted[i]}\n')
                gs.append(g)
            else:
                f.write(f'{gene_ids_sorted[i]},{vae_data_sorted[i]}\n')
                gs.append(gene_ids_sorted[i])
            i += 1
            if i >= num:
                break
        heatmap_df = pd.DataFrame()
        heatmap_df[gene_name] = gs
        heatmap_df['values'] = vae_data_sorted[:num]
        heatmap = Heatmap(heatmap_df, ['values'], gene_name, vmin=-4, vmax=4,
                  title=f'top {num} genes', cluster_cols=False, cluster_rows=False)
        heatmap.palette=sns.color_palette(sci_colour)
        heatmap.plot()
        pplot()
        save_fig(f'vae{n}_genes-top-{num}-{label}')
        plt.show()
        
for n in range(0, num_nodes):
    with open(f'{ora_dir}vae-{n + 1}_genes-top10_{experiment_name}_{date}.csv', 'w+') as f:
        f.write(gene_id + ',value\n')
        desc_sorted = (-vae_data[:,n]).argsort()  # Sort the genes by descending order
        gene_names_sorted = df[gene_name].values[desc_sorted]
        gene_ids_sorted = df[gene_id].values[desc_sorted]
        vae_data_sorted = vae_data[:,n][desc_sorted]
        plot_top_vae_genes(vae_data_sorted, gene_ids_sorted, gene_names_sorted, label="top")
        
    with open(f'{ora_dir}vae-{n + 1}_genes-bottom10_{experiment_name}_{date}.csv', 'w+') as f:
        f.write(gene_id + ',value\n')
        desc_sorted = (vae_data[:,n]).argsort()  # Sort the genes by descending order
        gene_names_sorted = df[gene_name].values[desc_sorted]
        vae_data_sorted = vae_data[:,n][desc_sorted]
        gene_ids_sorted = df[gene_id].values[desc_sorted]
        plot_top_vae_genes(vae_data_sorted, gene_ids_sorted, gene_names_sorted, label="bottom")

for n in range(0, num_nodes):
    with open(f'{ora_dir}vae-{n + 1}_{experiment_name}_{date}.csv', 'w+') as f:
        f.write(gene_id + ',value\n')
        desc_sorted = (vae_data[:,n]).argsort()  # Sort the genes by descending order
        gene_names_sorted = df[gene_id].values[desc_sorted]
        vae_data_sorted = vae_data[:,n][desc_sorted]
        for i, g in enumerate(gene_names_sorted):
            f.write(f'{g},{vae_data_sorted[i]}\n')
In [22]:
# -----------------------------------------------------------------------------------
#                         Save genes in each of the clusters we annotated (ORA)
# -----------------------------------------------------------------------------------
for i in range(0, n_clusters):
    with open(f'{ora_dir}cluster_{i}_gene-names_{experiment_name}_{date}.csv', 'w+') as f:
        genes = df[gene_name].values[vae_set_idxs[i]]
        rank_vae0 = vae_data[:, 0][vae_set_idxs[i]]
        rank_vae1 = vae_data[:, 1][vae_set_idxs[i]]
        rank_vae2 = vae_data[:, 2][vae_set_idxs[i]]
        f.write(f'gene_name,VAE-1,VAE-2,VAE-3\n')
        for i, g in enumerate(genes):
            f.write(f'{g},{rank_vae0[i]},{rank_vae1[i]},{rank_vae2[i]}\n')
    
In [23]:
import string
tissues = ['forebrain', 'midbrain', 'hindbrain', 'neural-tube', 
           'embryonic-facial-prominence', 'limb',
           'heart', 'liver']
marks = ['H3K9me3', 'H3K36me3', 'H3K27me3', 'H3K27ac', 'H3K4me1', 'H3K4me2', 'H3K4me3','H3K9ac']
def get_median_naninc(df, mark, hist_metric="", time_1="", time_2="", time_3="", tissue="brain"):
    cols = []
    for c in df.columns:
        if tissue in c and mark in c and hist_metric in c and (time_1 in c or time_2 in c or time_3 in c):
            cols.append(c)
    # get nan median
    vals = np.nanmedian(df[cols].values, axis=1)
    return vals

def plot_mark_heatmap(df, idxs, title, mark_cutoff=3.0):
    mark_df = pd.DataFrame()
    mark_values = []
    mean_col = []
    if idxs is None:
        num_genes = len(df)
    else:
        num_genes = len(idxs) * 1.0
    for t in [['10.5', '11.5', '12.5'], ['15.5', '15.5', '16.5']]:
        tissue_titles = []
        marks_title = []
        for m in marks:
            mark_col = []
            for tissue in tissues:
                median_all_data = get_median_naninc(df, m, "signal", t[0], t[1], t[2], tissue)
                if idxs is None:
                    median_genes = median_all_data
                else:
                    median_genes = median_all_data[idxs]     
                has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
                mark_col.append(has_mark/num_genes) #np.nan_to_num(np.nanmean(median_genes)))
                if string.capwords(tissue) not in tissue_titles:
                    if tissue == 'embryonic-facial-prominence':
                        if 'E.F.P' not in tissue_titles:
                            tissue_titles.append('E.F.P')
                    else:
                        tissue_titles.append(string.capwords(tissue))
            marks_title.append(string.capwords(m))
            mark_df[string.capwords(m)] = mark_col

        mark_df['Tissue'] = tissue_titles

        heatmap = Heatmap(mark_df, marks_title, 'Tissue', vmin=0, vmax=None, cmap=hist_cmap, figsize=(2,2),
                          title=f'{title} {",".join(t)}', cluster_rows=False, cluster_cols=False)
        heatmap.plot()
        pplot()
        print(mark_df.head())
        # vmin=0, vmax=1,
        save_fig(f'mark_all_tissues_signal-{title}_{"-".join(t)}')
        plt.show()
        
for i, gs in enumerate(vae_set_idxs):
    plot_mark_heatmap(df, gs, f'Cluster {i}')
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.076389  0.406250  0.427083  0.652778  0.656250  0.861111  0.885417   
1  0.076389  0.416667  0.503472  0.572917  0.628472  0.840278  0.871528   
2  0.059028  0.340278  0.531250  0.548611  0.559028  0.847222  0.861111   
3  0.104167  0.354167  0.451389  0.402778  0.597222  0.864583  0.819444   
4  0.138889  0.486111  0.534722  0.746528  0.715278  0.875000  0.888889   

     H3k9ac       Tissue  
0  0.739583    Forebrain  
1  0.722222     Midbrain  
2  0.701389    Hindbrain  
3  0.732639  Neural-tube  
4  0.795139        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.069444  0.263889  0.375000  0.524306  0.708333  0.833333  0.868056   
1  0.093750  0.256944  0.555556  0.489583  0.645833  0.871528  0.850694   
2  0.111111  0.270833  0.604167  0.472222  0.677083  0.857639  0.847222   
3  0.079861  0.190972  0.444444  0.451389  0.670139  0.854167  0.815972   
4  0.062500  0.277778  0.333333  0.593750  0.593750  0.871528  0.875000   

     H3k9ac       Tissue  
0  0.798611    Forebrain  
1  0.756944     Midbrain  
2  0.725694    Hindbrain  
3  0.638889  Neural-tube  
4  0.649306        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.122759  0.292874  0.560000  0.713563  0.702069  0.925977  0.925977   
1  0.136552  0.364138  0.607816  0.735632  0.687816  0.925057  0.930575   
2  0.092874  0.279080  0.464368  0.792184  0.509885  0.933793  0.933333   
3  0.110345  0.344828  0.287356  0.613333  0.583908  0.950805  0.926437   
4  0.231264  0.411954  0.769195  0.819770  0.772414  0.941609  0.945747   

     H3k9ac       Tissue  
0  0.864368    Forebrain  
1  0.880920     Midbrain  
2  0.866667    Hindbrain  
3  0.925977  Neural-tube  
4  0.881379        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.151264  0.299770  0.148046  0.714023  0.761839  0.906207  0.926437   
1  0.176552  0.416552  0.091034  0.808276  0.656552  0.942069  0.931034   
2  0.152184  0.416092  0.020230  0.830345  0.693333  0.951724  0.935172   
3  0.081379  0.241839  0.055632  0.840920  0.712184  0.954943  0.933793   
4  0.060230  0.204598  0.274023  0.549885  0.643218  0.935172  0.925057   

     H3k9ac       Tissue  
0  0.920460    Forebrain  
1  0.922759     Midbrain  
2  0.933333    Hindbrain  
3  0.906207  Neural-tube  
4  0.731954        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.107143  0.204178  0.837601  0.494609  0.779650  0.915094  0.929919   
1  0.097035  0.229784  0.911725  0.459569  0.767520  0.910377  0.929919   
2  0.076819  0.177224  0.895553  0.508760  0.666442  0.923854  0.937332   
3  0.100404  0.231132  0.758086  0.348383  0.721024  0.948787  0.932615   
4  0.184636  0.338949  0.915768  0.716307  0.822776  0.938005  0.951482   

     H3k9ac       Tissue  
0  0.750000    Forebrain  
1  0.745283     Midbrain  
2  0.739218    Hindbrain  
3  0.870620  Neural-tube  
4  0.854447        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.104447  0.164420  0.614555  0.375337  0.803235  0.891509  0.911051   
1  0.143531  0.216307  0.762803  0.431267  0.718329  0.927898  0.915768   
2  0.117925  0.248652  0.699461  0.493935  0.788410  0.942722  0.931267   
3  0.055930  0.132749  0.607817  0.496631  0.798518  0.948787  0.934636   
4  0.055930  0.166442  0.550539  0.492588  0.714960  0.932615  0.934636   

     H3k9ac       Tissue  
0  0.836253    Forebrain  
1  0.845013     Midbrain  
2  0.857143    Hindbrain  
3  0.783019  Neural-tube  
4  0.659704        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.063415  0.595122  0.000000  0.687805  0.497561  0.751220  0.731707   
1  0.043902  0.614634  0.000000  0.726829  0.580488  0.741463  0.741463   
2  0.024390  0.478049  0.000000  0.736585  0.448780  0.741463  0.741463   
3  0.043902  0.492683  0.000000  0.560976  0.575610  0.756098  0.726829   
4  0.141463  0.634146  0.004878  0.775610  0.541463  0.746341  0.746341   

     H3k9ac       Tissue  
0  0.712195    Forebrain  
1  0.731707     Midbrain  
2  0.707317    Hindbrain  
3  0.741463  Neural-tube  
4  0.736585        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.048780  0.224390  0.000000  0.585366  0.697561  0.692683  0.741463   
1  0.078049  0.151220  0.000000  0.541463  0.643902  0.765854  0.731707   
2  0.073171  0.229268  0.000000  0.560976  0.712195  0.770732  0.731707   
3  0.029268  0.146341  0.000000  0.619512  0.692683  0.765854  0.726829   
4  0.014634  0.351220  0.004878  0.673171  0.478049  0.756098  0.736585   

     H3k9ac       Tissue  
0  0.741463    Forebrain  
1  0.746341     Midbrain  
2  0.726829    Hindbrain  
3  0.673171  Neural-tube  
4  0.707317        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.090062  0.714286  0.055901  0.869565  0.593168  0.928571  0.940994   
1  0.086957  0.739130  0.142857  0.885093  0.621118  0.928571  0.937888   
2  0.055901  0.642857  0.071429  0.909938  0.447205  0.934783  0.944099   
3  0.049689  0.630435  0.027950  0.788820  0.552795  0.937888  0.940994   
4  0.195652  0.804348  0.285714  0.940994  0.673913  0.947205  0.950311   

     H3k9ac       Tissue  
0  0.909938    Forebrain  
1  0.909938     Midbrain  
2  0.894410    Hindbrain  
3  0.928571  Neural-tube  
4  0.940994        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.068323  0.419255  0.003106  0.801242  0.760870  0.897516  0.928571   
1  0.068323  0.450311  0.049689  0.779503  0.686335  0.934783  0.934783   
2  0.055901  0.447205  0.003106  0.788820  0.720497  0.937888  0.937888   
3  0.031056  0.263975  0.015528  0.819876  0.701863  0.934783  0.934783   
4  0.027950  0.453416  0.043478  0.857143  0.555901  0.944099  0.940994   

     H3k9ac       Tissue  
0  0.931677    Forebrain  
1  0.925466     Midbrain  
2  0.919255    Hindbrain  
3  0.894410  Neural-tube  
4  0.897516        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.108696  0.095538  0.810641  0.261442  0.702517  0.807208  0.814073   
1  0.106979  0.108124  0.800915  0.270595  0.692792  0.804920  0.816362   
2  0.087529  0.084668  0.808352  0.317506  0.614416  0.813501  0.826659   
3  0.113844  0.111556  0.728261  0.200801  0.661899  0.851831  0.814645   
4  0.200801  0.171625  0.827231  0.490847  0.754005  0.833524  0.842677   

     H3k9ac       Tissue  
0  0.600686    Forebrain  
1  0.615561     Midbrain  
2  0.615561    Hindbrain  
3  0.754577  Neural-tube  
4  0.684783        E.F.P  
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1115: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
<ipython-input-23-d9013eae8312>:34: RuntimeWarning: invalid value encountered in greater
  has_mark = 1.0 * len(np.where(median_genes > mark_cutoff)[0])
    H3k9me3  H3k36me3  H3k27me3   H3k27ac   H3k4me1   H3k4me2   H3k4me3  \
0  0.135584  0.092677  0.642449  0.243135  0.728261  0.792334  0.810641   
1  0.173341  0.172769  0.587529  0.366705  0.631007  0.837529  0.823227   
2  0.153890  0.169336  0.584668  0.404462  0.696796  0.859268  0.842677   
3  0.080092  0.089245  0.512586  0.395881  0.720252  0.863272  0.842105   
4  0.058924  0.084668  0.597826  0.264874  0.663043  0.830092  0.819794   

     H3k9ac       Tissue  
0  0.723112    Forebrain  
1  0.756865     Midbrain  
2  0.772883    Hindbrain  
3  0.702517  Neural-tube  
4  0.454233        E.F.P  

7) Inspecting the data in context of chromHMM annotations

Downloaded the pooled samples frmo http://enhancer.sdsc.edu/enhancer_export/ENCODE/chromHMM/pooled/ for forebrain, hindbrain, and midbrian at e16.5 on 04 December 2020.

http://enhancer.sdsc.edu/enhancer_export/ENCODE/chromHMM/readme

The files in this directory contain chromHMM chromatin state calls for multiple tissues during mouse embryonic development, as described here: http://www.biorxiv.org/content/early/2017/07/21/166652.

All files are in bed format. There is one file for each tissue at each developmental stage. The columns are 1) chromosome, 2) regions start, 3) region end, 4) chromatin state number 5) Chromatin state label. There are 15 chromating states, labeled as follows:

    State   Label   Description
    1   Pr-A    Promoter, Active
    2   Pr-W    Promoter, Weak/Inactive
    3   Pr-B    Promoter, Bivalent
    4   Pr-F    Promoter, Flanking
    5   En-Sd   Enhancer, Strong TSS-distal
    6   En-Sp   Enhancer, Strong TSS-proximal
    7   En-W    Enhancer, Weak TSS-distal
    8   En-Pd   Enhancer, Poised TSS-distal
    9   En-Pp   Enhancer, Poised TSS-proximal
    10  Tr-S    Transcription, Strong
    11  Tr-P    Transcription, Permissive
    12  Tr-I    Transcription, Initiation
    13  Hc-P    Heterochromatin, Polycomb-associated
    14  Hc-H    Heterochromatin, H3K9me3-associated
    15  NS  No Chromatin Signal
    NRS NRS No Reproducible State (ony relevant to "replicated" call set)


There are four subdirectories:

rep1\ This subdirectory contains chromatin state calls made using ChIP-seq datasets from biological replicate 1 (two biological replicates were performed for each ChIP-seq experiment).

rep2\ This subdirectory contains chromatin state calls made using ChIP-seq datasets from biological replicate 2.

replicated\ This subdirectory contains the intersection of the replicate 1 and replicate 2 chromatin state calls. Here, we require that a region is called in the same state in both replicates. If a region is not called in the same state in both replicates, it is labeled "NRS" for No Reproducible Signal. Note this is differenct than state 15, which is "No Signal."

pooled\ This subdirectory contains chromatin state calls on ChIP-seq data pooled from both replicates. We expect this will be the desired set of files for most users.

Each subdirectory has two additional subdirectorites:

archive\ This contains an older version of the bed files in which there are only state number, no labels. Aside from the labels, the files are identical to the working versions in the main directory.

tracks\ This contains bigBed versions of the files for visualization on the UCSC Genome Browser.

There is one additional subdirectory that does not conform to the templates decribed above. This is 6_mark_models. This subdirectory contains chromHMM segmentation of the e10.5 stage where we did not have all 8 marks. Note that the 11-state and 16-states models used for this segmentation are distinct from the 15-state (8-mark) model described above for the other stages. Please see manuscript and Extended Data Figure 7 for additional information.

    header = "chr,start,end,label,annotation"
    bed = Bed(os.path.join(self.data_dir, 'e16.5_forebrain_15_segments.bed'),
              header=None, overlap_method='in_promoter',
              output_bed_file=os.path.join(self.data_dir, 'e16.5_forebrain_15_segments_selectedPeaks.bed'),
              buffer_after_tss=0, buffer_before_tss=10, buffer_gene_overlap=0,
              gene_start=3, gene_end=4, gene_chr=2, gene_direction=5, gene_name=0,
              chr_idx=0, start_idx=1, end_idx=2, peak_value=4, header_extra="3", sep='\t'
              )
    # Add the gene annot
    bed.set_annotation_from_file(self.mm10_annot)
    # Now we can run the assign values
    bed.assign_locations_to_genes()
    bed.save_loc_to_csv(f'{self.data_dir}test_e16.5_forebrain_15_segments.csv')
In [24]:
# -----------------------------------------------------------------------------------
#                         Merge information with annotations
# -----------------------------------------------------------------------------------

chrom_dir = os.path.join(supp_dir, "annot")
chromhmm_annot = pd.read_csv(f'{chrom_dir}/e16.5_forebrain_15_segments.csv')
print(len(chromhmm_annot), len(df))
# Make sure we only keep 1 annotation per gene
chromhmm_annot = chromhmm_annot.groupby('external_gene_name').first()
# Merge this with our dataframe
df = df.merge(chromhmm_annot, on='external_gene_name', how='left', suffixes=('', '_chmm'))
# Ensure the new length is the same as the old length
len(df)
53254 12797
Out[24]:
12797
In [25]:
# We also want to plot the annotations from gorkin et al for each of the clusters
from statsmodels.stats.multitest import multipletests

def run_annot_plot(df_bg, df_fg, title=""):
    changes = []
    order = ['Pr-A', 'Pr-W', 'Pr-B', 'Pr-F', 'En-Sd', 'En-Sp', 
         'En-W', 'En-Pd', 'En-Pp', 'Tr-S', 'Tr-P', 'Tr-I', 
          'Hc-P', 'Hc-H', 'NS']
    total = len(df_bg) * 1.0
    total_sig = len(df_fg) * 1.0
    perc_all = []
    perc_sig = []
    
    for o in order:
        o_all = len(df_bg[df_bg['peak_value'] == o])
        o_sig = len(df_fg[df_fg['peak_value'] == o])
        perc_all.append(o_all)
        perc_sig.append(o_sig)
        if o_all == 0 and o_sig == 0:
            changes.append(0)
        else:
            changes.append(((o_sig) - (o_all)))

    odds_ratios = []
    pvalues = []
    for i, o in enumerate(order):
        # Do a FET on each one
        oddsratio, pvalue = stats.fisher_exact([[perc_sig[i], perc_all[i]], 
                                                [total_sig - perc_sig[i],
                                                 total - perc_all[i]]])

        print(o, oddsratio, pvalue,[[perc_sig[i], perc_all[i]], 
                                                [total_sig - perc_sig[i], 
                                                 total - perc_all[i]]])
        odds_ratios.append(oddsratio)
        pvalues.append(pvalue)

    reg, padj, a, b = multipletests(pvalues, alpha=0.1, 
                                    method='fdr_bh', returnsorted=False)

    p_sigs = []
    for p in padj: 
        if p > 0.05:
            p_sigs.append('')
        elif p <= 0.05 and p > 0.01:
            p_sigs.append('*')
        elif p <= 0.01 and p > 0.001:
            p_sigs.append('**')
        elif p <= 0.001 and p > 0.0001:
            p_sigs.append('***')
        elif p <= 0.0001:
            p_sigs.append('****')
        else:
            print(p)
            p_sigs.append('')

    fig, ax = plt.subplots(figsize=(1.5,1.0))
    c = [grey] * 14
    c[2] = "green"
    c[12] = "green"
    plt.bar(order, odds_ratios, color=c, linewidth=0.5, edgecolor='black')
    rects = ax.patches
    # Make some labels.
    labels = [f'{p_sigs[i]}' for i in range(0, len(rects))]

    for rect, label in zip(rects, labels):
        height = rect.get_height()
        ax.text(rect.get_x() + rect.get_width() / 2, height, label,
                ha='center', va='bottom')
    plt.ylim(0, 7)
    plt.yticks(np.arange(0, 7, 2.0))
    ax.set_title(f'Odds ratio FET for significant dataset {title} compared to all genes ChromHMM annotations')
    ax.set_xlabel('', fontsize=6)
    ax.set_ylabel('Odds ratio', fontsize=6)
    ax.set_xticklabels(order, rotation=90, ha="center")

        
    ax.tick_params(direction='out', length=2, width=0.5)
    ax.spines['bottom'].set_linewidth(0.5)
    ax.spines['top'].set_linewidth(0)
    ax.spines['left'].set_linewidth(0.5)
    ax.spines['right'].set_linewidth(0)
    ax.tick_params(labelsize=6)
    ax.tick_params(axis='x', which='major', pad=0)
    ax.tick_params(axis='y', which='major', pad=0)

    save_fig(f'OR-CM-{title}')
    
    plt.show()

for gene_set_label in vae_set_labels:
    run_annot_plot(df, df[df[gene_set_label] == True], title=f'Training vs {gene_set_label}')
Pr-A 0.4423394208340445 1.4719001515054364e-09 [[64, 5022], [224.0, 7775.0]]
Pr-W 0.5701477971036069 0.00048705809492993236 [[42, 2949], [246.0, 9848.0]]
Pr-B 3.1676315789473684 2.299173134040863e-10 [[48, 760], [240.0, 12037.0]]
Pr-F 2.1936924136743303 2.2016435201978222e-05 [[43, 948], [245.0, 11849.0]]
En-Sd 0.0 0.6326991804893207 [[0, 53], [288.0, 12744.0]]
En-Sp 3.0159880210597496 4.099485961114449e-05 [[20, 309], [268.0, 12488.0]]
En-W 0.0 1.0 [[0, 18], [288.0, 12779.0]]
En-Pd 0.3268034585107756 0.3760976006161658 [[1, 135], [287.0, 12662.0]]
En-Pp 1.044842246053166 0.8426489374894943 [[7, 298], [281.0, 12499.0]]
Tr-S 0.0 1.0 [[0, 34], [288.0, 12763.0]]
Tr-P 0.7936871687508251 0.5296853408818598 [[14, 774], [274.0, 12023.0]]
Tr-I 0.0 0.2784118144519454 [[0, 96], [288.0, 12701.0]]
Hc-P 4.034493874919407 7.148686467536862e-08 [[24, 282], [264.0, 12515.0]]
Hc-H 0.0 1.0 [[0, 41], [288.0, 12756.0]]
NS 0.5727913533834587 0.15670939265509967 [[8, 608], [280.0, 12189.0]]
<ipython-input-25-85741dc630f1>:75: UserWarning: FixedFormatter should only be used together with FixedLocator
  ax.set_xticklabels(order, rotation=90, ha="center")
Pr-A 1.0059113667867448 0.9055168397771187 [[857, 5022], [1319.0, 7775.0]]
Pr-W 1.154449806680587 0.007906740402944663 [[559, 2949], [1617.0, 9848.0]]
Pr-B 0.5419901941164699 2.1325887110218836e-07 [[72, 760], [2104.0, 12037.0]]
Pr-F 1.6812971053708372 1.81744455590736e-11 [[258, 948], [1918.0, 11849.0]]
En-Sd 1.1101238697538285 0.720726819885118 [[10, 53], [2166.0, 12744.0]]
En-Sp 1.5225202284663095 0.00163105698072965 [[79, 309], [2097.0, 12488.0]]
En-W 1.3074483323102108 0.5496035744148849 [[4, 18], [2172.0, 12779.0]]
En-Pd 1.1342360034453058 0.573452138981315 [[26, 135], [2150.0, 12662.0]]
En-Pp 0.74547811728957 0.09975526881465972 [[38, 298], [2138.0, 12499.0]]
Tr-S 0.5182453100890609 0.3531506922334391 [[3, 34], [2173.0, 12763.0]]
Tr-P 0.8270547388379847 0.06887833866612816 [[110, 774], [2066.0, 12023.0]]
Tr-I 1.8495165424044735 0.004965588146389274 [[30, 96], [2146.0, 12701.0]]
Hc-P 0.8734471275598715 0.47308163197808567 [[42, 282], [2134.0, 12515.0]]
Hc-H 0.4295286947347154 0.19676862843683268 [[3, 41], [2173.0, 12756.0]]
NS 0.21416490453956535 7.427899556771208e-20 [[23, 608], [2153.0, 12189.0]]
<ipython-input-25-85741dc630f1>:75: UserWarning: FixedFormatter should only be used together with FixedLocator
  ax.set_xticklabels(order, rotation=90, ha="center")
Pr-A 0.2578286333533865 2.463321823708609e-90 [[212, 5022], [1273.0, 7775.0]]
Pr-W 0.653368127736742 1.9415790956984283e-09 [[243, 2949], [1242.0, 9848.0]]
Pr-B 7.681506578947368 2.191156221770149e-178 [[485, 760], [1000.0, 12037.0]]
Pr-F 2.001784183808017 2.1026136462019836e-15 [[205, 948], [1280.0, 11849.0]]
En-Sd 0.8123406425293218 0.8300621969981207 [[5, 53], [1480.0, 12744.0]]
En-Sp 1.3499537196559714 0.0645383427453444 [[48, 309], [1437.0, 12488.0]]
En-W 0.4783992213237496 0.7138534816610574 [[1, 18], [1484.0, 12779.0]]
En-Pd 0.38049733303283 0.012129125012561357 [[6, 135], [1479.0, 12662.0]]
En-Pp 0.6307210980471313 0.040855224140089005 [[22, 298], [1463.0, 12499.0]]
Tr-S 0.0 0.04458748510459902 [[0, 34], [1485.0, 12763.0]]
Tr-P 0.33118386772300595 3.1137450487666468e-12 [[31, 774], [1454.0, 12023.0]]
Tr-I 1.0778173794976238 0.7520519648091625 [[12, 96], [1473.0, 12701.0]]
Hc-P 5.699182457048007 1.2146617425209372e-54 [[169, 282], [1316.0, 12515.0]]
Hc-H 0.0 0.01893554741935244 [[0, 41], [1485.0, 12756.0]]
NS 0.013509230032628742 3.3830703677712647e-28 [[1, 608], [1484.0, 12189.0]]
<ipython-input-25-85741dc630f1>:75: UserWarning: FixedFormatter should only be used together with FixedLocator
  ax.set_xticklabels(order, rotation=90, ha="center")
Pr-A 0.44510404221425726 3.674257036863855e-07 [[46, 5022], [160.0, 7775.0]]
Pr-W 2.034969481180061 2.509651227199046e-06 [[78, 2949], [128.0, 9848.0]]
Pr-B 0.0 6.9653299347191526e-06 [[0, 760], [206.0, 12037.0]]
Pr-F 0.43966138710429786 0.02979537898497949 [[7, 948], [199.0, 11849.0]]
En-Sd 2.3573806881243065 0.21655002112492566 [[2, 53], [204.0, 12744.0]]
En-Sp 0.8002819699445672 1.0 [[4, 309], [202.0, 12488.0]]
En-W 0.0 1.0 [[0, 18], [206.0, 12779.0]]
En-Pd 1.8572790612394572 0.28627745983843633 [[4, 135], [202.0, 12662.0]]
En-Pp 0.6198465963566635 0.6363482655070556 [[3, 298], [203.0, 12499.0]]
Tr-S 0.0 1.0 [[0, 34], [206.0, 12763.0]]
Tr-P 1.397201372653569 0.18530509922644214 [[17, 774], [189.0, 12023.0]]
Tr-I 1.9552032019704433 0.20717402718359929 [[3, 96], [203.0, 12701.0]]
Hc-P 0.0 0.025027933222104327 [[0, 282], [206.0, 12515.0]]
Hc-H 1.5176680547293278 0.48920151710089793 [[1, 41], [205.0, 12756.0]]
NS 2.6436524002313475 9.555351272628169e-05 [[24, 608], [182.0, 12189.0]]
<ipython-input-25-85741dc630f1>:75: UserWarning: FixedFormatter should only be used together with FixedLocator
  ax.set_xticklabels(order, rotation=90, ha="center")
Pr-A 1.1759460559331292 0.16566096889251913 [[139, 5022], [183.0, 7775.0]]
Pr-W 1.830268409108694 9.223689125866741e-07 [[114, 2949], [208.0, 9848.0]]
Pr-B 0.0 7.413211950490235e-09 [[0, 760], [322.0, 12037.0]]
Pr-F 0.8277447117668427 0.5163164591175706 [[20, 948], [302.0, 11849.0]]
En-Sd 0.0 0.6422042633896662 [[0, 53], [322.0, 12744.0]]
En-Sp 1.0296621524127554 0.8539977934911598 [[8, 309], [314.0, 12488.0]]
En-W 4.4371527777777775 0.08539064554742595 [[2, 18], [320.0, 12779.0]]
En-Pd 0.0 0.0830354955470836 [[0, 135], [322.0, 12662.0]]
En-Pp 0.661560773188237 0.45394883077997616 [[5, 298], [317.0, 12499.0]]
Tr-S 0.0 1.0 [[0, 34], [322.0, 12763.0]]
Tr-P 0.6013003250812703 0.0947717140988974 [[12, 774], [310.0, 12023.0]]
Tr-I 0.8268880208333333 1.0 [[2, 96], [320.0, 12701.0]]
Hc-P 0.0 0.0014449107784398917 [[0, 282], [322.0, 12515.0]]
Hc-H 0.0 0.6269975701598558 [[0, 41], [322.0, 12756.0]]
NS 0.44550438596491226 0.03127241534893527 [[7, 608], [315.0, 12189.0]]
<ipython-input-25-85741dc630f1>:75: UserWarning: FixedFormatter should only be used together with FixedLocator
  ax.set_xticklabels(order, rotation=90, ha="center")
Pr-A 0.12749783306393048 8.938580862248941e-182 [[133, 5022], [1615.0, 7775.0]]
Pr-W 0.5521202667570928 2.767357785906358e-18 [[248, 2949], [1500.0, 9848.0]]
Pr-B 8.17320377048432 3.1317516906205092e-220 [[595, 760], [1153.0, 12037.0]]
Pr-F 1.6697682882113754 1.718503722747606e-09 [[206, 948], [1542.0, 11849.0]]
En-Sd 0.8281957411779997 0.8411009426935607 [[6, 53], [1742.0, 12744.0]]
En-Sp 0.5151293560883049 0.0014905431093137048 [[22, 309], [1726.0, 12488.0]]
En-W 0.81322387679776 1.0 [[2, 18], [1746.0, 12779.0]]
En-Pd 0.8118227864332884 0.5280642042984738 [[15, 135], [1733.0, 12662.0]]
En-Pp 0.73241477916416 0.12146753694362011 [[30, 298], [1718.0, 12499.0]]
Tr-S 0.4299912404824473 0.309444325892567 [[2, 34], [1746.0, 12763.0]]
Tr-P 0.8037839283326648 0.06583202388419548 [[86, 774], [1662.0, 12023.0]]
Tr-I 0.914530529953917 0.8823555400286036 [[12, 96], [1736.0, 12701.0]]
Hc-P 6.25715238042331 3.6598568597009336e-72 [[216, 282], [1532.0, 12515.0]]
Hc-H 4.514247696162394 6.313132283922742e-08 [[25, 41], [1723.0, 12756.0]]
NS 1.1393491853878954 0.2581139573400176 [[94, 608], [1654.0, 12189.0]]
<ipython-input-25-85741dc630f1>:75: UserWarning: FixedFormatter should only be used together with FixedLocator
  ax.set_xticklabels(order, rotation=90, ha="center")
In [26]:
df_bg = df_all.copy()  # Make a copy so we don't override the other one

# Also have a look at how the marks plot over genes that are not significant
chrom_dir = os.path.join(supp_dir, "annot")
chromhmm_annot = pd.read_csv(f'{chrom_dir}/e16.5_forebrain_15_segments.csv')
print(len(chromhmm_annot), len(df_bg))
# Make sure we only keep 1 annotation per gene
chromhmm_annot = chromhmm_annot.groupby('external_gene_name').first()
# Merge this with our dataframe
df_bg = df_bg.merge(chromhmm_annot, on='external_gene_name', how='left', suffixes=('', '_chmm'))
# Ensure the new length is the same as the old length
run_annot_plot(df_bg, df, title=f'Training vs All')
53254 20900
Pr-A 1.622932800129698 2.818017067299491e-92 [[5022, 5950], [7775.0, 14950.0]]
Pr-W 1.4846246759177353 7.04819175454217e-45 [[2949, 3508], [9848.0, 17392.0]]
Pr-B 1.4129216422369582 1.3014535827248074e-11 [[760, 894], [12037.0, 20006.0]]
Pr-F 1.4373626757386773 3.833534384602958e-15 [[948, 1102], [11849.0, 19798.0]]
En-Sd 1.2740666888224217 0.18993047392586293 [[53, 68], [12744.0, 20832.0]]
En-Sp 1.4157700584761927 1.0955105546292346e-05 [[309, 359], [12488.0, 20541.0]]
En-W 0.8397035314634501 0.5748447551175753 [[18, 35], [12779.0, 20865.0]]
En-Pd 1.1034986574000947 0.39619131465404356 [[135, 200], [12662.0, 20700.0]]
En-Pp 1.2738035709523428 0.0021298162746898365 [[298, 384], [12499.0, 20516.0]]
Tr-S 0.7927155505311111 0.3115949752781515 [[34, 70], [12763.0, 20830.0]]
Tr-P 0.6793885517103826 8.200875290916301e-19 [[774, 1809], [12023.0, 19091.0]]
Tr-I 1.2562160459806315 0.09547730174599986 [[96, 125], [12701.0, 20775.0]]
Hc-P 1.143157320126739 0.09501093517145413 [[282, 404], [12515.0, 20496.0]]
Hc-H 0.267657724638121 4.731558690297586e-19 [[41, 248], [12756.0, 20652.0]]
NS 0.16188287235203244 0.0 [[608, 4923], [12189.0, 15977.0]]
<ipython-input-25-85741dc630f1>:75: UserWarning: FixedFormatter should only be used together with FixedLocator
  ax.set_xticklabels(order, rotation=90, ha="center")

) Epi genes annotation

Using the information from: https://epifactors.autosome.ru/ (EpiFactors: a comprehensive database of human epigenetic factors and complexes, by Yulia A. Medvedeva et al) we test each cluser for enrichment for epigenetic complex's and functions.

In [27]:
epi_genes = pd.read_csv(os.path.join(supp_dir, 'EpiGenes_main.csv'))
df_epi = df.merge(epi_genes, left_on='external_gene_name', right_on='MGI_symbol',
                      how='left', suffixes=('', '_eg'))
    
ax = sns.countplot(x="Function", data=df_epi)
ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
save_fig(f'Epigenes-function')
plt.show() 
ax = sns.countplot(x="Target", data=df_epi)
ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
save_fig(f'Epigenes-target')
plt.show() 

for set_label in vae_set_labels:
    try:
        vae_mse.u.dp([set_label])
        ax = sns.countplot(x="Function", data=df_epi[df_epi[set_label] == True])
        ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right")
        plt.tight_layout()
        save_fig(f'Epigenes-function-{set_label}')
        plt.show() 
        ax = sns.countplot(x="Target", data=df_epi[df_epi[set_label] == True])
        ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right")
        plt.tight_layout()
        save_fig(f'Epigenes-target-{set_label}')
        plt.show() 
        # Complex_name Modification
        ax = sns.countplot(x="Complex_name", data=df_epi[df_epi[set_label] == True])
        ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right")
        plt.tight_layout()
        save_fig(f'Epigenes-Complex_name-{set_label}')
        plt.show() 
        ax = sns.countplot(x="Modification", data=df_epi[df_epi[set_label] == True])
        ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right")
        plt.tight_layout()
        save_fig(f'Epigenes-Modification-{set_label}')
        plt.show() 
    except:
        print(set_label)
<ipython-input-27-4ffd89933e6f>:7: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
--------------------------------------------------------------------------------
                                     Set 1	                                     
--------------------------------------------------------------------------------
<ipython-input-27-4ffd89933e6f>:21: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:37: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:21: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
--------------------------------------------------------------------------------
                                     Set 2	                                     
--------------------------------------------------------------------------------
<ipython-input-27-4ffd89933e6f>:32: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:37: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
--------------------------------------------------------------------------------
                                     Set 3	                                     
--------------------------------------------------------------------------------
<ipython-input-27-4ffd89933e6f>:21: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:32: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:37: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:21: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
--------------------------------------------------------------------------------
                                     Set 4	                                     
--------------------------------------------------------------------------------
<ipython-input-27-4ffd89933e6f>:37: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:21: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
--------------------------------------------------------------------------------
                                     Set 5	                                     
--------------------------------------------------------------------------------
<ipython-input-27-4ffd89933e6f>:32: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:37: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
<ipython-input-27-4ffd89933e6f>:21: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations. 
  plt.tight_layout()
--------------------------------------------------------------------------------
                                     Set 6	                                     
--------------------------------------------------------------------------------
In [28]:
df_sig = pd.read_csv(f'{input_dir}df-significant_epi-2500_20210124.csv')
/Users/ariane/opt/miniconda3/envs/ml/lib/python3.8/site-packages/IPython/core/interactiveshell.py:3062: DtypeWarning: Columns (4) have mixed types.Specify dtype option on import or set low_memory=False.
  has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
In [29]:
###############################################################################
#                                                                             #
#    This program is free software: you can redistribute it and/or modify     #
#    it under the terms of the GNU General Public License as published by     #
#    the Free Software Foundation, either version 3 of the License, or        #
#    (at your option) any later version.                                      #
#                                                                             #
#    This program is distributed in the hope that it will be useful,          #
#    but WITHOUT ANY WARRANTY; without even the implied warranty of           #
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
#    GNU General Public License for more details.                             #
#                                                                             #
#    You should have received a copy of the GNU General Public License        #
#    along with this program. If not, see <http://www.gnu.org/licenses/>.     #
#                                                                             #
###############################################################################

import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns

from sciviso import Vis


class Violinplot(Vis):

    def __init__(self, df: pd.DataFrame, x: object, y: object, title='', xlabel='', ylabel='', hue=None, order=None,
                 hue_order=None, showfliers=False, add_dots=False, figsize=(1.5, 1.5), title_font_size=8,
                 add_stats=False, stat_method='Mann-Whitney',
                 label_font_size=6, title_font_weight=700):
        super().__init__(df, figsize=figsize, title_font_size=title_font_size, label_font_size=label_font_size,
                         title_font_weight=title_font_weight)
        self.df = df
        self.x = x
        self.y = y
        self.xlabel = xlabel
        self.ylabel = ylabel
        self.title = title
        self.hue = hue
        self.order = order
        self.hue_order = hue_order
        self.showfliers = showfliers
        self.add_dots = add_dots
        self.add_stats = add_stats
        self.stat_method = stat_method

    def plot(self):
        x, y, hue, order, hue_order = self.x, self.y, self.hue, self.order, self.hue_order
        if not isinstance(self.x, str) and not isinstance(self.y, str):
            vis_df = pd.DataFrame()
            vis_df['x'] = x
            vis_df['y'] = y
            x = 'x'
            y = 'y'
            if self.hue is not None:
                vis_df['colour'] = self.hue
                hue = 'colour'
            if order is None:
                order = list(set(vis_df['x'].values))
                order.sort()
        else:
            vis_df = self.df
        # set the orders
        if hue_order is None and hue is not None:
            hue_order = list(set(vis_df[hue].values))
            hue_order.sort()
        if order is None:
            order = list(set(vis_df[x].values))
            order.sort()

        ax = sns.violinplot(data=vis_df, x=x, y=y, hue=hue, hue_order=hue_order, order=order, palette=self.palette,
                            showfliers=self.showfliers, inner="quartile")
        if self.add_dots:
            ax = sns.stripplot(data=vis_df, x=x, y=y, hue_order=hue_order, order=order, color='.2')

        if self.add_stats:
            # Add all pairs in the order if the box pairs is none

            pairs = []
            box_pairs = []
            for i in order:
                for j in order:
                    if i != j:
                        # Ensure we don't get duplicates
                        pair = f'{i}{j}' if i < j else f'{j}{i}'
                        if pair not in pairs:
                            box_pairs.append((i, j))
                            pairs.append(pair)
            # Add stats annotation
            add_stat_annotation(ax, data=vis_df, x=x, y=y, order=order,
                                box_pairs=box_pairs,
                                test=self.stat_method, text_format='star', loc='inside', verbose=2)
        ax.set_xticklabels(ax.get_xticklabels(), rotation=45, horizontalalignment='right')
        ax.tick_params(labelsize=self.label_font_size)
        plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0., fontsize=self.label_font_size)
        self.add_labels()
        self.set_ax_params(ax)
        return ax
In [30]:
# Have a look at the TFs and their targets for regulons (i.e. does grp2 have TFs that tagret group3?)
regs = pd.read_csv(supp_dir + 'regulons_mm10_A-B.csv')
reg_tfs = set(regs['tf'].values)
group_labels = {1: 'Prolifferation', 2: 'Posterior', 3: 'Immune response', 4: 'Development', 5: 'Forebrain'}

for i in range(1, n_clusters):
    genes = df_training[gene_name].values[vae_set_idxs[i]]
    # Flag the TFs in this group, we'll then test these to see if we have lots of the targets in another group
    tfs = list(reg_tfs & set(genes)) 
    # Now we want to go through each of the other groups and record how many were targetted
    u.dp([group_labels[i], f'\n{len(tfs)} Tfs: ', ', '.join(tfs)])

    for j in range(1, n_clusters):
        genes_targets = df_training[gene_name].values[vae_set_idxs[j]]
        total_targets = 0
        for tf in tfs:
            targets = set(regs[regs['tf'] == tf]['target'].values)
            total_targets += len(list(targets & set(genes_targets)))
            if len(list(targets & set(genes_targets))) > 0:
                print(f'{tf} -->', ', '.join(list(targets & set(genes_targets))))
        print(f'--------------- Total for {group_labels[i]} targeting {group_labels[j]}: {total_targets} -------------')

        
#regs = pd.read_csv(supp_dir + 'regulons_mm10_A-B-C-D.csv')
regs[regs['tf'] == 'Cdkn1b'] #Tbx3, mesoderm markeds Hand1, gata2
#df_sig = pd.read_csv(f'{input_dir}df-significant_epi-2500_20210124.csv')
for g in regs[regs['target'] == 'Foxm1']['tf'].values:
    if len(df_training[df_training[gene_name] == g]) > 0:
        print(g, '\n')
        #print(df_sig[df_sig[gene_name] == g])

fox_df = df_training[df_training[gene_name] == 'Rb1']
h3k36 = [c for c in fox_df.columns if 'H3K27me3' in c and 'brain' in c and 'signal' in c and 'median' not in c]
for c in h3k36:
    print(c, fox_df[c].values)
--------------------------------------------------------------------------------
Prolifferation	
13 Tfs: 	Sox10, Stat3, Nr4a1, Rxra, Rara, Fos, Ahr, Ets2, Foxo4, Tcf3, Stat2, Bach1, Nfkb1	
--------------------------------------------------------------------------------
Sox10 --> Ednrb, Col11a2, Plp1
Stat3 --> Chil1, Junb, Fos, Socs1, Klf11, Vegfa, Bcl2, Cdk4, Ror1, Cd274
Rara --> Hoxa7, Hoxb4, Plau, Hoxa1, Hoxa4, Crabp2, Nrip1, Prkca
Fos --> Ppard, Mmp2, Plau, Vegfa, Mmp9, Cdk4, Stim1, Nefl, Greb1, Nfkb1
Ahr --> Vgll4, Fos
Ets2 --> Fos, Mmp9
Tcf3 --> Med15, Nup210
Bach1 --> Gclc, Slc48a1, Me1, Mapt
Nfkb1 --> Tnc, Mmp9, Cd83, Vegfa, Hsd11b2, Cdk4, Akt1, Nod2, Cftr, Mmp2, Adora1, Crmp1, F3, Gadd45g, Amh, Tnfrsf23, Plau, Cd40, Csf1, Junb, Traf1, Bcl2
--------------- Total for Prolifferation targeting Prolifferation: 63 -------------
Sox10 --> Sox6, Pdgfra, Mbp, Ret
Stat3 --> Ccnd2, Cdkn1a, Gfap, Ccnd1, Egfr
Rara --> Hoxa7, Ier3, Hoxd4, Hoxb4, Rarg, Cdkn1a, Hoxa4, Thbd, Icam1, Cyp26a1
Fos --> Foxa1, Il4ra, Penk, Acta1, Ntf3, Ezr, Cdkn1a, Nfatc1, Gata3, Cdh1, Ccnd1, Maf, Bcl2l11, Nefl, Ercc1, Pdgfb, Itga5
Ahr --> Cyp1b1
Ets2 --> Fli1, Pthlh, Icam1
Foxo4 --> Cdkn1a, Bcl2l11, Cdkn1b
Tcf3 --> Cdk6, Piezo1
Stat2 --> Bst2
Bach1 --> Cdk6, Slc48a1
Nfkb1 --> Pthlh, Ier3, Crmp1, Ccnd2, Fn1, Tnc, Lpl, Gata3, Akt1, Thbd, Ccnd1, Egfr, Col1a1, Col1a2, Pdgfb, Wt1, Icam1
--------------- Total for Prolifferation targeting Posterior: 65 -------------
Stat3 --> Birc5
Ets2 --> Brca1
Nfkb1 --> Birc5, Brca1
--------------- Total for Prolifferation targeting Immune response: 4 -------------
Stat3 --> Birc5, Ltbp1, Cdk4
Nr4a1 --> E2f1
Rara --> Crabp2
Fos --> Cdk4
Ets2 --> Cdk1
Tcf3 --> Nup210
Bach1 --> Lbr
Nfkb1 --> Vim, Birc5, Cdk4
--------------- Total for Prolifferation targeting Development: 12 -------------
Sox10 --> Mag, Gjc2, Ret
Stat3 --> Junb, Vip, Gfap, Trh, Egfr
Rara --> Hoxa7, Hoxb4, Hoxd4, Hoxa1, Hoxa4, Thbd, Tnfaip2, Icam1, Cyp26a1
Fos --> Foxa1, Nts, Pgr, Penk, Fgf2, Acta1, Ntf3, Nfatc1, Mmp9, Gata3, Cdh1, Nefl, Bcl2l11, Pdgfb, Loxl4
Ahr --> Cyp1b1, Ugt1a6a, Erg
Ets2 --> Pthlh, Mmp9, Cd163, Erg, Icam1
Foxo4 --> Tnfsf10, Bcl2l11
Stat2 --> Ifit3b, Ifit3
Bach1 --> Tnfaip2
Nfkb1 --> Bcl3, Lta, Mmp9, Bcl2a1b, Pdgfb, Serpinb1b, Cd83, Pthlh, Serpina3n, Egfr, Tnfsf10, Cftr, Icam1, Adora1, Serpina3g, Gata3, Thbd, Wt1, Tnfrsf23, Junb, Traf1
--------------- Total for Prolifferation targeting Forebrain: 66 -------------
--------------------------------------------------------------------------------
Posterior	
34 Tfs: 	Sox10, Pax8, Gata2, Twist1, Nr2f2, Pitx1, Lhx3, Nfatc2, Cebpa, Arntl, Sox9, Rreb1, Sox2, Tal1, Foxa1, Gli2, Foxa2, Nfic, Tfap2c, Epas1, Gata3, Nr5a1, Wt1, Ppara, Cebpb, Fli1, Pax6, Foxl2, Stat6, Foxo1, Usf1, Klf4, Lhx4, Tfap2a	
--------------------------------------------------------------------------------
Sox10 --> Ednrb, Col11a2, Plp1
Pax8 --> Ncam1, Bcl2
Gata2 --> Htr5a, Sgk1
Twist1 --> Srpx, Fos, Mmp2, Vegfa
Nr2f2 --> Apoa1
Nfatc2 --> Cdk4
Cebpa --> Stat3, Id1, Eln, Gls2, Mmp11, Ccne1, Cftr, Per2, Crmp1, F3, Cdh13, Ehhadh, Kcnh8, Fgl2, Csf1, Bcl2, Apoa1, Vldlr, Smyd2
Arntl --> Nr1d1, Per2, Bhlhe40
Sox9 --> Amh, Matn1
Sox2 --> Epha4, Inpp4b, Tead1, Ebf1, Pde4b, Hhat, Nedd4l, Anks1b, Ntm, Lrp1b, Lrrc7, Nbea, Zfpm2, App, Sorcs1, Kalrn, Agap1, Plcl1, Pam, Ntng1, Ext1, Lrba, Sipa1l2, Ptprd, Pbx3, Chn2, Lrig1, Trpc4, Nav3, Arid5b, Rbms3, Kcnmb2, Eif4g3, Csmd3, Adamtsl1, Zfp536, Nlgn1, Gria1, Slc44a3, Trio, Sema3d, Dcc, Trim2, Ctnnd2, Ryr2, Ryr3, Fgd4, Vgll4, Ptprm, Phactr1, Slc22a23, Skap2, Galntl6, Mcc, Syt1, Plcb1, Alk, Cntn4, Csmd1, Hivep3, Nrp2, Erbb4, Spock1, Cacna2d1, Kcnip4, Slco3a1, Hivep2, Fhod3
Tal1 --> Cdh13, Cdh23, Nfkb1, Dock9
Foxa1 --> Bcl2, Krt7, Apoa1, Greb1, Cftr
Gli2 --> Ifngr1, Bcl2
Foxa2 --> Wwc1, Cftr, Apoa1
Nfic --> Matn1, Hsd11b2
Tfap2c --> Mmp2, Greb1, Crabp2
Epas1 --> Vegfa
Gata3 --> Rbms1, Apba1, Tgfbr3, Arnt2, Sh3kbp1, Grm7, Greb1, Tlr5, Nrcam, Nfkb1
Nr5a1 --> Amh
Wt1 --> Amh, Bcl2
Ppara --> Angptl4, Apoa1, Mmp9
Cebpb --> Fos, Gadd45g, Furin
Fli1 --> Igfbp3, Fos, Itga2b
Pax6 --> Ctnnd2, Mmp2, Pcsk1
Foxl2 --> Fos, Nr5a2, Amh
Stat6 --> Socs1, Fos
Foxo1 --> Rps6ka3, Cnr1, Cdkn1c, Timp3, Dusp4
Usf1 --> Hoxb7, Hoxb4, Cxcr4, Cdk4
Klf4 --> Rara, Lama3
Tfap2a --> Mmp2, Snap91, Prkca, Bcl2, Vegfa, Crabp2, Hoxa4, Kit, Ache, Oat, Cftr, App
--------------- Total for Posterior targeting Prolifferation: 178 -------------
Sox10 --> Sox6, Pdgfra, Mbp, Ret
Pax8 --> Gata3, Wt1, Slc5a5
Gata2 --> Lyl1, Wt1, Tgfb2
Twist1 --> Cdh1, Cdkn1a, Cldn7, Gli1
Nr2f2 --> Acta1, Ppara, Penk
Cebpa --> Igf2, Crmp1, Fn1, Tnfrsf1a, Foxa2, Cdkn1a, Apbb1ip, Nr5a1, Ccnd1, Smyd2, Tsc22d3, Aebp1, Icam1
Sox9 --> Nkx3-2, Hes1, Cdkn1a, Comp, Cldn7
Sox2 --> Stxbp6, Prune2, Nedd4l, Piezo2, Bmpr1b, Ccnd1, App, Sox6, Tenm4, Nrg1, Cdh11, Isl1, Tenm3, Col12a1, Sbf2, Cacna2d3, Dlg1, Rbms3, Itpr2, Gli2, Cadps2, Col14a1, Sox5, Gria1, Egln3, Trpm3, Tns3, Creb5, Tle4, Sdk1, Cacna2d1, Mcc, Esrrg
Tal1 --> Aldh1a2
Foxa1 --> Ret, Abca1, Cebpa, Erbb3, Foxc1
Gli2 --> Foxe1, Gli1, Foxa2, Efemp1, Ccnd1, Ptch1, Wnt2b
Foxa2 --> Cdh1
Nfic --> Gfap, Tfap2a, Col1a1, Col18a1, Itga5
Tfap2c --> Foxa1, Cdkn1a, Foxc1, Ret
Epas1 --> Pdgfb, Egln3, Flt1, Adora2a
Gata3 --> Epor, Il4ra, Fn1, Epha7, Svil, Cdh1, Maf, Egfr, Sst, Foxc1
Wt1 --> Pdgfa, Igf2, Cdkn1a, Cdh1, Nr5a1, Pax2, Egfr, Thbs1
Ppara --> Ccnd1, Fabp3, Lpl, Cpt1a
Cebpb --> Igf2, Cdkn1a
Fli1 --> Tgfbr2
Pax6 --> Itga5
Foxl2 --> Ier3
Foxo1 --> Klf2, Ccnd2, Cdkn1a, Cdkn1b, Timp3, Ccnd1, Bcl2l11, Cdkn2b
Usf1 --> Hoxb7, Hoxb4, Tgfb2, Slc1a3, Abca1, Cebpa, Trim25, Tgfb1
Klf4 --> Cdh1, Thbd, Ccnd1, Cdkn1a
Tfap2a --> Foxa1, Penk, Igfbp5, Cdkn1a, Hoxa4, Cdh1, Egfr, Hsd17b1, Taf7, App
--------------- Total for Posterior targeting Posterior: 152 -------------
Cebpa --> Ccnb1, Top2a
Sox2 --> Rad51b
Foxa1 --> Brca1
Nfic --> Pole2
Foxo1 --> Mcm5, Ccnb2, Ccnb1
Usf1 --> Ccnb1, Tyms
Klf4 --> Birc5
Tfap2a --> Ccnb1
--------------- Total for Posterior targeting Immune response: 12 -------------
Pax8 --> E2f1
Nfatc2 --> Cdk4
Cebpa --> Tk1, Uhrf1, E2f2, Ccne1, Pcna, Top2a, Ccnb1
Sox9 --> Hapln1, Col9a1
Sox2 --> Epb41l2, Dcc
Gli2 --> Ifngr1, Pcna
Tfap2c --> Crabp2
Gata3 --> Galnt10, Slit2
Wt1 --> Mycn
Foxo1 --> Mcm5, Ccnb2, Ccnb1
Usf1 --> Myh9, Ccnb1, Cdk4
Klf4 --> Birc5
Tfap2a --> Ccnb1, Crabp2
--------------- Total for Posterior targeting Development: 28 -------------
Sox10 --> Mag, Gjc2, Ret
Pax8 --> Gata3, Wt1, Slc5a5
Gata2 --> Wt1, Htr5a, Elmo1
Twist1 --> Cdh1
Nr2f2 --> Acta1, Ppara, Penk
Nfatc2 --> Egr3
Cebpa --> Foxa2, Ace, Nr5a1, Tsc22d3, Cftr, Icam1
Sox9 --> Psg16, Comp, Nkx3-2, Mia
Sox2 --> Ebf1, Pde4b, Prune2, Piezo2, Spock1, Myo10, Ephb1, Cacna2d3, Mctp1, Elmo1, Itpr2, Csmd3, Col14a1, Opcml, Slc44a3, Dpp10, Ryr2, Cdh18, Cpne4, Skap2, Galntl6, Creb5, Alk, Cntn4, Csmd1, Hivep3, Dab1, Erbb4, Sdk1, Prr16, Esrrg
Tal1 --> Aldh1a2, Cdh23, Cd34, Erg, Elmo1
Foxa1 --> Cebpa, Erbb3, Cftr, Ret
Gli2 --> Wnt2b, Foxa2, Foxe1
Foxa2 --> Cdh1, Cftr
Nfic --> Smug1, Tfap2a, Gfap
Tfap2c --> Foxa1, Ret
Epas1 --> Pdgfb, Flt1, Sphk1
Gata3 --> St8sia6, Gcnt4, Cdh1, Grm7, Egfr, Sst, Erg
Nr5a1 --> Cyp11a1
Wt1 --> Pdgfa, Nphs1, Cdh1, Nr5a1, Pax2, Egfr
Ppara --> Fabp3, Mmp9
Cebpb --> Adm
Fli1 --> Erg
Pax6 --> Olfm3, Met
Foxl2 --> Bcl2a1b, Nr5a2, Il11
Foxo1 --> Tnfsf10, Klf2, Cdkn2b, Bcl2l11
Usf1 --> Isg20, Hoxb7, Hoxb4, Cebpa, Ptgds, Trim25, Tgfb1, Slc22a2
Klf4 --> Cdh1, Thbd, Lama3
Tfap2a --> Foxa1, S100b, Penk, Adm, Cyp11a1, Hoxa4, Cdh1, Ache, Egfr, Hsd17b1, Cftr
--------------- Total for Posterior targeting Forebrain: 126 -------------
--------------------------------------------------------------------------------
                     Immune response	
2 Tfs: 	Stat4, Foxm1	                     
--------------------------------------------------------------------------------
Foxm1 --> Mmp2, Lama4, Fos, Vegfa, Cdc25b
--------------- Total for Immune response targeting Prolifferation: 5 -------------
Stat4 --> Ccnd2
Foxm1 --> Ccnd2, Foxf1, Cdkn1a, Onecut1, Cdkn1b, Ccnd1, Bmi1
--------------- Total for Immune response targeting Posterior: 8 -------------
Foxm1 --> Cenpa, Plk1, Aurkb, Cdc25c, Birc5, Cdc6, Ccnb1, Cenpf
--------------- Total for Immune response targeting Immune response: 8 -------------
Foxm1 --> Cenpf, Cenpa, Plk1, Aurkb, Birc5, Cdc6, Ccnb1, Cdc25b
--------------- Total for Immune response targeting Development: 8 -------------
Foxm1 --> Foxf1, Onecut1
--------------- Total for Immune response targeting Forebrain: 2 -------------
--------------------------------------------------------------------------------
        Development	
7 Tfs: 	E2f1, E2f2, Sox9, Mybl2, Tcf3, Foxm1, Mycn	        
--------------------------------------------------------------------------------
E2f1 --> Spock1, Ppp1r13b, Sntb2, Axin2, Klf10, Meis1, Hic1, Cdkn1c, Ccne1, Vegfa, Stx11, Kcnj2, Ampd3, Map2k6, Mipep, Rxrg, Dusp4, Ptpro, Rassf8, Tmbim1, Gpr158, Dcc, Diras2, Plekhb1, Kcnk10, Sez6l2, Ctnnd2, Kcng4, Slc35f3, Syne2, Nell2, Bcl2, Dgki, Racgap1, Fam184a, Hmga1b, Cldn23, Mras, Trpm2
Sox9 --> Amh, Matn1
Tcf3 --> Med15, Nup210
Foxm1 --> Mmp2, Lama4, Fos, Vegfa, Cdc25b
--------------- Total for Development targeting Prolifferation: 48 -------------
E2f1 --> Socs2, Cdh20, Abca1, Cdkn1a, Ccnd1, Pax2, Kdr, Bmi1, Cldn5, Hic1, Ier3, Osr1, Cbs, Eya2, Pdpn, Trp73, Mapk8, Egfr, Hoxb9, Phldb1, Pcsk6, Bmp4, Sstr1, Arhgef17, Casp7, Foxa2, Gata3, Ercc1, Lingo1, Tgfb2, Flt1, Rbm38, Wrap73, Thbs1, Mras, Cdkn2c
Sox9 --> Nkx3-2, Hes1, Cdkn1a, Comp, Cldn7
Tcf3 --> Cdk6, Piezo1
Foxm1 --> Ccnd2, Foxf1, Cdkn1a, Onecut1, Cdkn1b, Ccnd1, Bmi1
Mycn --> Ndrg1
--------------- Total for Development targeting Posterior: 51 -------------
E2f1 --> Mcm5, Kif24, Brca1, Tyms, Dtl, Fancd2, Cdt1, Pole2, Cdc6, Ccna2, Rad51, Ect2, Asf1b, Top2a, Fanca, Plk1, Aurka, Hells, Fbxo5, Birc5, Cdc45, Foxm1, Dbf4, Gmnn, Mcm10
E2f2 --> Mcm5, Mcm10, Plk1, Asf1b, Cdt1, Cdc6
Foxm1 --> Cenpa, Plk1, Aurkb, Cdc25c, Birc5, Cdc6, Ccnb1, Cenpf
Mycn --> Mcm5, Mcm3, Mcm2
--------------- Total for Development targeting Immune response: 42 -------------
E2f1 --> Mcm5, Cdk1, Dtl, Axin2, Cdt1, Pcna, Cdc6, Mcm6, Mycn, Ccna2, Rad51, Ect2, Ccne1, Asf1b, Pdpn, Top2a, Mcm7, Tk1, Kif23, Aurka, Plk1, Hells, Dcc, Birc5, Foxm1, Gmnn, Mcm10, Uhrf1, Mybl2
E2f2 --> Mcm5, E2f1, Mcm10, Plk1, Asf1b, Cdt1, Mcm7, Cdc6, Mcm6, Mycn
Sox9 --> Hapln1, Col9a1
Tcf3 --> Nup210
Foxm1 --> Cenpf, Cenpa, Plk1, Aurkb, Birc5, Cdc6, Ccnb1, Cdc25b
Mycn --> Mcm5, Mcm2, Mcm4, Mcm7, Nes, Mcm6, Mcm3
--------------- Total for Development targeting Development: 57 -------------
E2f1 --> Cux1, Ppp1r13b, Cldn23, Pax2, Cldn5, Hic1, Ampd3, Trp73, Egfr, Hoxb9, Bmp4, Sstr1, Foxa2, Gpr158, Gata3, Kcnj16, Lingo1, Enpep, Flt1, Ntng2, Wrap73, Spock1, Slc35f3, Trpm2
Sox9 --> Psg16, Comp, Nkx3-2, Mia
Mybl2 --> Psg16
Foxm1 --> Foxf1, Onecut1
Mycn --> Ndrg1
--------------- Total for Development targeting Forebrain: 32 -------------
--------------------------------------------------------------------------------
Forebrain	
25 Tfs: 	Sox10, Pgr, Pax8, Gata2, Lhx3, Nfatc2, Cebpa, Arntl, Stat5a, Fosl2, Erg, Foxa1, Foxa2, Nfic, Epas1, Gata3, Nr5a1, Wt1, Ppara, Cebpb, Pax6, Stat6, Foxo1, Lhx4, Tfap2a	
--------------------------------------------------------------------------------
Sox10 --> Ednrb, Col11a2, Plp1
Pgr --> Bcl2, Vegfa
Pax8 --> Ncam1, Bcl2
Gata2 --> Htr5a, Sgk1
Nfatc2 --> Cdk4
Cebpa --> Stat3, Id1, Eln, Gls2, Mmp11, Ccne1, Cftr, Per2, Crmp1, F3, Cdh13, Ehhadh, Kcnh8, Fgl2, Csf1, Bcl2, Apoa1, Vldlr, Smyd2
Arntl --> Nr1d1, Per2, Bhlhe40
Stat5a --> Bcl2
Erg --> Mmp9
Foxa1 --> Bcl2, Krt7, Apoa1, Greb1, Cftr
Foxa2 --> Wwc1, Cftr, Apoa1
Nfic --> Matn1, Hsd11b2
Epas1 --> Vegfa
Gata3 --> Rbms1, Apba1, Tgfbr3, Arnt2, Sh3kbp1, Grm7, Greb1, Tlr5, Nrcam, Nfkb1
Nr5a1 --> Amh
Wt1 --> Amh, Bcl2
Ppara --> Angptl4, Apoa1, Mmp9
Cebpb --> Fos, Gadd45g, Furin
Pax6 --> Ctnnd2, Mmp2, Pcsk1
Stat6 --> Socs1, Fos
Foxo1 --> Rps6ka3, Cnr1, Cdkn1c, Timp3, Dusp4
Tfap2a --> Mmp2, Snap91, Prkca, Bcl2, Vegfa, Crabp2, Hoxa4, Kit, Ache, Oat, Cftr, App
--------------- Total for Forebrain targeting Prolifferation: 86 -------------
Sox10 --> Sox6, Pdgfra, Mbp, Ret
Pgr --> Ccnd1
Pax8 --> Gata3, Wt1, Slc5a5
Gata2 --> Lyl1, Wt1, Tgfb2
Cebpa --> Igf2, Crmp1, Fn1, Tnfrsf1a, Foxa2, Cdkn1a, Apbb1ip, Nr5a1, Ccnd1, Smyd2, Tsc22d3, Aebp1, Icam1
Stat5a --> Ccnd1, Ccnd2
Fosl2 --> Ndrg1
Erg --> Icam1
Foxa1 --> Ret, Abca1, Cebpa, Erbb3, Foxc1
Foxa2 --> Cdh1
Nfic --> Gfap, Tfap2a, Col1a1, Col18a1, Itga5
Epas1 --> Pdgfb, Egln3, Flt1, Adora2a
Gata3 --> Epor, Il4ra, Fn1, Epha7, Svil, Cdh1, Maf, Egfr, Sst, Foxc1
Wt1 --> Pdgfa, Igf2, Cdkn1a, Cdh1, Nr5a1, Pax2, Egfr, Thbs1
Ppara --> Ccnd1, Fabp3, Lpl, Cpt1a
Cebpb --> Igf2, Cdkn1a
Pax6 --> Itga5
Foxo1 --> Klf2, Ccnd2, Cdkn1a, Cdkn1b, Timp3, Ccnd1, Bcl2l11, Cdkn2b
Tfap2a --> Foxa1, Penk, Igfbp5, Cdkn1a, Hoxa4, Cdh1, Egfr, Hsd17b1, Taf7, App
--------------- Total for Forebrain targeting Posterior: 86 -------------
Cebpa --> Ccnb1, Top2a
Fosl2 --> Brca1
Foxa1 --> Brca1
Nfic --> Pole2
Foxo1 --> Mcm5, Ccnb2, Ccnb1
Tfap2a --> Ccnb1
--------------- Total for Forebrain targeting Immune response: 9 -------------
Pax8 --> E2f1
Nfatc2 --> Cdk4
Cebpa --> Tk1, Uhrf1, E2f2, Ccne1, Pcna, Top2a, Ccnb1
Erg --> Vim
Gata3 --> Galnt10, Slit2
Wt1 --> Mycn
Foxo1 --> Mcm5, Ccnb2, Ccnb1
Tfap2a --> Ccnb1, Crabp2
--------------- Total for Forebrain targeting Development: 18 -------------
Sox10 --> Mag, Gjc2, Ret
Pax8 --> Gata3, Wt1, Slc5a5
Gata2 --> Wt1, Htr5a, Elmo1
Nfatc2 --> Egr3
Cebpa --> Foxa2, Ace, Nr5a1, Tsc22d3, Cftr, Icam1
Fosl2 --> Ndrg1
Erg --> Icam1, Fgf2, Mmp9
Foxa1 --> Cebpa, Erbb3, Cftr, Ret
Foxa2 --> Cdh1, Cftr
Nfic --> Smug1, Tfap2a, Gfap
Epas1 --> Pdgfb, Flt1, Sphk1
Gata3 --> St8sia6, Gcnt4, Cdh1, Grm7, Egfr, Sst, Erg
Nr5a1 --> Cyp11a1
Wt1 --> Pdgfa, Nphs1, Cdh1, Nr5a1, Pax2, Egfr
Ppara --> Fabp3, Mmp9
Cebpb --> Adm
Pax6 --> Olfm3, Met
Foxo1 --> Tnfsf10, Klf2, Cdkn2b, Bcl2l11
Tfap2a --> Foxa1, S100b, Penk, Adm, Cyp11a1, Hoxa4, Cdh1, Ache, Egfr, Hsd17b1, Cftr
--------------- Total for Forebrain targeting Forebrain: 66 -------------
E2f1 

E2f4 

Hif1a 

Myc 

forebrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF115VPJ_signal [nan]
forebrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF592HST_signal [nan]
forebrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF397HZX_signal [nan]
forebrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF076ZNJ_signal [nan]
forebrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF591TWD_signal [nan]
forebrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF082ONF_signal [nan]
forebrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF686XPK_signal [nan]
hindbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF475JXJ_signal [nan]
hindbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF809JLW_signal [nan]
hindbrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF435HPM_signal [nan]
hindbrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF324KBG_signal [nan]
hindbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF658ZBC_signal [nan]
hindbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF086VKO_signal [nan]
hindbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF787IGD_signal [nan]
midbrain_10.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF942MEP_signal [2.27189]
midbrain_11.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF041KRQ_signal [nan]
midbrain_12.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF635JKX_signal [nan]
midbrain_13.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF276UEL_signal [nan]
midbrain_14.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF402CBS_signal [nan]
midbrain_15.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF962ZLC_signal [nan]
midbrain_16.5-days_embryonic_H3K27me3_ChIP-seq_ENCFF887CCI_signal [nan]